public ComputeGraphTensor(IWeightFactory weightFactory, int deviceId, bool needBack = true) { weightTensorFactory = weightFactory as WeightTensorFactory; needs_backprop = needBack; this.deviceId = deviceId; }
public ComputeGraphTensor(IWeightFactory weightFactory, int deviceId, bool needBack = true, bool visNetwork = false, ConcurrentList <Action> backprop = null) { m_backprop = backprop != null ? backprop : new ConcurrentList <Action>(); m_weightTensorFactory = weightFactory as WeightTensorFactory; m_needsBackprop = needBack; m_deviceId = deviceId; m_visNeuralNetwork = visNetwork; if (m_visNeuralNetwork) { // Initialize parameters for neural network visualization m_opsViz = new Microsoft.Msagl.Drawing.Graph(); m_setEdges = new HashSet <string>(); } }