public void Reset(IWeightFactory weightFactory, int batchSize) { foreach (LSTMAttentionDecoderCell item in m_decoders) { item.Reset(weightFactory, batchSize); } }
public void Reset(IWeightFactory weightFactory, int batchSize) { foreach (var item in m_decoders) { item.Reset(weightFactory, batchSize); } }
public ComputeGraphTensor(IWeightFactory weightFactory, int deviceId, bool needBack = true) { weightTensorFactory = weightFactory as WeightTensorFactory; needs_backprop = needBack; this.deviceId = deviceId; }
public ComputeGraph(IWeightFactory weightFactory, bool needBack = true) { weightMatrixFactory = weightFactory as WeightMatrixFactory; this.needs_backprop = needBack; }
public void Reset(IWeightFactory weightFactory) { foreach (var item in decoders) { item.Reset(weightFactory); } }
public void SetBatchSize(IWeightFactory weightFactory, int batchSize) { foreach (var item in encoders) { item.SetBatchSize(weightFactory, batchSize); } }
public void Reset(IWeightFactory weightFactory, int batchSize) { foreach (LSTMCell item in encoders) { item.Reset(weightFactory, batchSize); } }
public void SetBatchSize(IWeightFactory weightFactory, int batchSize) { attentionLayer.SetBatchSize(batchSize); foreach (var item in decoders) { item.SetBatchSize(weightFactory, batchSize); } }
public void Reset(IWeightFactory weightFactory) { foreach (var item in forwardEncoders) { item.Reset(weightFactory); } foreach (var item in backwardEncoders) { item.Reset(weightFactory); } }
public void Reset(IWeightFactory weightFactory, int batchSize) { foreach (var item in m_forwardEncoders) { item.Reset(weightFactory, batchSize); } foreach (var item in m_backwardEncoders) { item.Reset(weightFactory, batchSize); } }
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>(); } }
public void Reset(IWeightFactory weightFactory, int batchSize) { if (this.m_hidden != null) { this.m_hidden.Dispose(); this.m_hidden = null; } if (this.m_cell != null) { this.m_cell.Dispose(); this.m_cell = null; } this.m_hidden = weightFactory.CreateWeightTensor(batchSize, this.m_hdim, this.m_deviceId, true, $"{this.m_name}.{nameof(this.m_hidden)}", true); this.m_cell = weightFactory.CreateWeightTensor(batchSize, this.m_hdim, this.m_deviceId, true, $"{this.m_name}.{nameof(this.m_cell)}", true); }
public void Reset(IWeightFactory weightFactory, int batchSize) { if (m_hidden != null) { m_hidden.Dispose(); m_hidden = null; } if (m_cell != null) { m_cell.Dispose(); m_cell = null; } m_hidden = weightFactory.CreateWeightTensor(batchSize, m_hdim, m_deviceId, true, name: $"{m_name}.{nameof(m_hidden)}", isTrainable: true); m_cell = weightFactory.CreateWeightTensor(batchSize, m_hdim, m_deviceId, true, name: $"{m_name}.{nameof(m_cell)}", isTrainable: true); }
public ComputeGraphTensor(IWeightFactory weightFactory, int deviceId, bool needBack = true, ConcurrentList <Action> backprop = null, bool isSubGraph = false) { m_backprop = backprop != null ? backprop : new ConcurrentList <Action>(); m_weightTensorFactory = weightFactory as WeightTensorFactory; m_needsBackprop = needBack; m_deviceId = deviceId; //m_visNeuralNetwork = visNetwork; m_isSubGraph = isSubGraph; //m_name2SubGraph = new Dictionary<string, Subgraph>(); //if (m_visNeuralNetwork) //{ // // Initialize parameters for neural network visualization // m_opsViz = new Microsoft.Msagl.Drawing.Graph(); // m_setEdges = new HashSet<string>(); //} m_tensorsBindToCurrentGraph = new List <IWeightTensor>(); }
public void Reset(IWeightFactory weightFactory, int batchSize) { this.Hidden = weightFactory.CreateWeightTensor(batchSize, this.m_hiddenDim, this.m_deviceId, true, $"{this.m_name}.{nameof(this.Hidden)}", true); this.Cell = weightFactory.CreateWeightTensor(batchSize, this.m_hiddenDim, this.m_deviceId, true, $"{this.m_name}.{nameof(this.Cell)}", true); }
private void Reset(IWeightFactory weightFactory, Encoder encoder, Encoder reversEncoder, AttentionDecoder decoder) { encoder.Reset(weightFactory); reversEncoder.Reset(weightFactory); decoder.Reset(weightFactory); }
public void Reset(IWeightFactory weightFactory) { Hidden = weightFactory.CreateWeights(m_batchSize, m_hdim, m_deviceId, true, name: $"{m_name}.{nameof(Hidden)}", isTrainable: true); Cell = weightFactory.CreateWeights(m_batchSize, m_hdim, m_deviceId, true, name: $"{m_name}.{nameof(Cell)}", isTrainable: true); }
public void Reset(IWeightFactory weightFactory, int batchSize) { }
public void Reset(IWeightFactory weightFactory, int batchSize) { Hidden = weightFactory.CreateWeightTensor(batchSize, m_hiddenDim, m_deviceId, true, name: $"{m_name}.{nameof(Hidden)}", isTrainable: true); Cell = weightFactory.CreateWeightTensor(batchSize, m_hiddenDim, m_deviceId, true, name: $"{m_name}.{nameof(Cell)}", isTrainable: true); }
public void SetBatchSize(IWeightFactory weightFactory, int batchSize) { this.batchSize = batchSize; Reset(weightFactory); }
public void Reset(IWeightFactory weightFactory) { ht = weightFactory.CreateWeights(batchSize, hdim, deviceId, true); ct = weightFactory.CreateWeights(batchSize, hdim, deviceId, true); }
public ComputeGraphMKL(IWeightFactory weightFactory, bool needBack = true) : base(weightFactory, needBack) { }
public void Reset(IWeightFactory weightFactory) { }