public class MKLDNNLSTMHelper extends Object implements LSTMHelper
Constructor and Description |
---|
MKLDNNLSTMHelper() |
Modifier and Type | Method and Description |
---|---|
FwdPassReturn |
activate(Layer layer,
NeuralNetConfiguration conf,
IActivation gateActivationFn,
INDArray input,
INDArray recurrentWeights,
INDArray inputWeights,
INDArray biases,
boolean training,
INDArray prevOutputActivations,
INDArray prevMemCellState,
boolean forBackprop,
boolean forwards,
String inputWeightKey,
INDArray maskArray,
boolean hasPeepholeConnections,
LayerWorkspaceMgr workspaceMgr) |
Pair<Gradient,INDArray> |
backpropGradient(NeuralNetConfiguration conf,
IActivation gateActivationFn,
INDArray input,
INDArray recurrentWeights,
INDArray inputWeights,
INDArray epsilon,
boolean truncatedBPTT,
int tbpttBackwardLength,
FwdPassReturn fwdPass,
boolean forwards,
String inputWeightKey,
String recurrentWeightKey,
String biasWeightKey,
Map<String,INDArray> gradientViews,
INDArray maskArray,
boolean hasPeepholeConnections,
LayerWorkspaceMgr workspaceMgr) |
boolean |
checkSupported(IActivation gateActivationFn,
IActivation activationFn,
boolean hasPeepholeConnections) |
Map<String,Long> |
helperMemoryUse()
Return the currently allocated memory for the helper.
(a) Excludes: any shared memory used by multiple helpers/layers (b) Excludes any temporary memory (c) Includes all memory that persists for longer than the helper method This is mainly used for debugging and reporting purposes. |
public boolean checkSupported(IActivation gateActivationFn, IActivation activationFn, boolean hasPeepholeConnections)
checkSupported
in interface LSTMHelper
public Pair<Gradient,INDArray> backpropGradient(NeuralNetConfiguration conf, IActivation gateActivationFn, INDArray input, INDArray recurrentWeights, INDArray inputWeights, INDArray epsilon, boolean truncatedBPTT, int tbpttBackwardLength, FwdPassReturn fwdPass, boolean forwards, String inputWeightKey, String recurrentWeightKey, String biasWeightKey, Map<String,INDArray> gradientViews, INDArray maskArray, boolean hasPeepholeConnections, LayerWorkspaceMgr workspaceMgr)
backpropGradient
in interface LSTMHelper
public FwdPassReturn activate(Layer layer, NeuralNetConfiguration conf, IActivation gateActivationFn, INDArray input, INDArray recurrentWeights, INDArray inputWeights, INDArray biases, boolean training, INDArray prevOutputActivations, INDArray prevMemCellState, boolean forBackprop, boolean forwards, String inputWeightKey, INDArray maskArray, boolean hasPeepholeConnections, LayerWorkspaceMgr workspaceMgr)
activate
in interface LSTMHelper
public Map<String,Long> helperMemoryUse()
LayerHelper
helperMemoryUse
in interface LayerHelper
Copyright © 2020. All rights reserved.