Class LSTMHelpers
- java.lang.Object
-
- org.deeplearning4j.nn.layers.recurrent.LSTMHelpers
-
public class LSTMHelpers extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FwdPassReturn
activateHelper(BaseRecurrentLayer layer, NeuralNetConfiguration conf, IActivation gateActivationFn, INDArray input, INDArray recurrentWeights, INDArray originalInputWeights, INDArray biases, boolean training, INDArray originalPrevOutputActivations, INDArray originalPrevMemCellState, boolean forBackprop, boolean forwards, String inputWeightKey, INDArray maskArray, boolean hasPeepholeConnections, LSTMHelper helper, CacheMode cacheMode, LayerWorkspaceMgr workspaceMgr, boolean isHelperAllowFallback)
Returns FwdPassReturn object with activations/INDArrays.static Pair<Gradient,INDArray>
backpropGradientHelper(BaseRecurrentLayer layer, 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, LSTMHelper helper, LayerWorkspaceMgr workspaceMgr, boolean isHelperAllowFallback)
static LayerMemoryReport
getMemoryReport(boolean isGraves, FeedForwardLayer lstmLayer, InputType inputType)
static LayerMemoryReport
getMemoryReport(AbstractLSTM lstmLayer, InputType inputType)
static LayerMemoryReport
getMemoryReport(GravesBidirectionalLSTM lstmLayer, InputType inputType)
-
-
-
Method Detail
-
activateHelper
public static FwdPassReturn activateHelper(BaseRecurrentLayer layer, NeuralNetConfiguration conf, IActivation gateActivationFn, INDArray input, INDArray recurrentWeights, INDArray originalInputWeights, INDArray biases, boolean training, INDArray originalPrevOutputActivations, INDArray originalPrevMemCellState, boolean forBackprop, boolean forwards, String inputWeightKey, INDArray maskArray, boolean hasPeepholeConnections, LSTMHelper helper, CacheMode cacheMode, LayerWorkspaceMgr workspaceMgr, boolean isHelperAllowFallback)
Returns FwdPassReturn object with activations/INDArrays. Allows activateHelper to be used for forward pass, backward pass and rnnTimeStep whilst being reasonably efficient for all
-
backpropGradientHelper
public static Pair<Gradient,INDArray> backpropGradientHelper(BaseRecurrentLayer layer, 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, LSTMHelper helper, LayerWorkspaceMgr workspaceMgr, boolean isHelperAllowFallback)
-
getMemoryReport
public static LayerMemoryReport getMemoryReport(AbstractLSTM lstmLayer, InputType inputType)
-
getMemoryReport
public static LayerMemoryReport getMemoryReport(GravesBidirectionalLSTM lstmLayer, InputType inputType)
-
getMemoryReport
public static LayerMemoryReport getMemoryReport(boolean isGraves, FeedForwardLayer lstmLayer, InputType inputType)
-
-