public class LSTMHelpers extends Object
When 'hasPeepholeConnections' is true, this is the "vanilla" variant in said paper
When 'hasPeepholeConnections' is false, this is the "no peephole" variant
http://arxiv.org/pdf/1503.04069.pdf
Modifier and Type | Method and Description |
---|---|
static FwdPassReturn |
activateHelper(BaseLayer layer,
NeuralNetConfiguration conf,
org.nd4j.linalg.activations.IActivation gateActivationFn,
org.nd4j.linalg.api.ndarray.INDArray input,
org.nd4j.linalg.api.ndarray.INDArray recurrentWeights,
org.nd4j.linalg.api.ndarray.INDArray originalInputWeights,
org.nd4j.linalg.api.ndarray.INDArray biases,
boolean training,
org.nd4j.linalg.api.ndarray.INDArray originalPrevOutputActivations,
org.nd4j.linalg.api.ndarray.INDArray originalPrevMemCellState,
boolean forBackprop,
boolean forwards,
String inputWeightKey,
org.nd4j.linalg.api.ndarray.INDArray maskArray,
boolean hasPeepholeConnections,
LSTMHelper helper,
CacheMode cacheMode)
Returns FwdPassReturn object with activations/INDArrays.
|
static org.nd4j.linalg.primitives.Pair<Gradient,org.nd4j.linalg.api.ndarray.INDArray> |
backpropGradientHelper(NeuralNetConfiguration conf,
org.nd4j.linalg.activations.IActivation gateActivationFn,
org.nd4j.linalg.api.ndarray.INDArray input,
org.nd4j.linalg.api.ndarray.INDArray recurrentWeights,
org.nd4j.linalg.api.ndarray.INDArray inputWeights,
org.nd4j.linalg.api.ndarray.INDArray epsilon,
boolean truncatedBPTT,
int tbpttBackwardLength,
FwdPassReturn fwdPass,
boolean forwards,
String inputWeightKey,
String recurrentWeightKey,
String biasWeightKey,
Map<String,org.nd4j.linalg.api.ndarray.INDArray> gradientViews,
org.nd4j.linalg.api.ndarray.INDArray maskArray,
boolean hasPeepholeConnections,
LSTMHelper helper) |
static LayerMemoryReport |
getMemoryReport(AbstractLSTM lstmLayer,
InputType inputType) |
static LayerMemoryReport |
getMemoryReport(boolean isGraves,
FeedForwardLayer lstmLayer,
InputType inputType) |
static LayerMemoryReport |
getMemoryReport(GravesBidirectionalLSTM lstmLayer,
InputType inputType) |
public static FwdPassReturn activateHelper(BaseLayer layer, NeuralNetConfiguration conf, org.nd4j.linalg.activations.IActivation gateActivationFn, org.nd4j.linalg.api.ndarray.INDArray input, org.nd4j.linalg.api.ndarray.INDArray recurrentWeights, org.nd4j.linalg.api.ndarray.INDArray originalInputWeights, org.nd4j.linalg.api.ndarray.INDArray biases, boolean training, org.nd4j.linalg.api.ndarray.INDArray originalPrevOutputActivations, org.nd4j.linalg.api.ndarray.INDArray originalPrevMemCellState, boolean forBackprop, boolean forwards, String inputWeightKey, org.nd4j.linalg.api.ndarray.INDArray maskArray, boolean hasPeepholeConnections, LSTMHelper helper, CacheMode cacheMode)
public static org.nd4j.linalg.primitives.Pair<Gradient,org.nd4j.linalg.api.ndarray.INDArray> backpropGradientHelper(NeuralNetConfiguration conf, org.nd4j.linalg.activations.IActivation gateActivationFn, org.nd4j.linalg.api.ndarray.INDArray input, org.nd4j.linalg.api.ndarray.INDArray recurrentWeights, org.nd4j.linalg.api.ndarray.INDArray inputWeights, org.nd4j.linalg.api.ndarray.INDArray epsilon, boolean truncatedBPTT, int tbpttBackwardLength, FwdPassReturn fwdPass, boolean forwards, String inputWeightKey, String recurrentWeightKey, String biasWeightKey, Map<String,org.nd4j.linalg.api.ndarray.INDArray> gradientViews, org.nd4j.linalg.api.ndarray.INDArray maskArray, boolean hasPeepholeConnections, LSTMHelper helper)
public static LayerMemoryReport getMemoryReport(AbstractLSTM lstmLayer, InputType inputType)
public static LayerMemoryReport getMemoryReport(GravesBidirectionalLSTM lstmLayer, InputType inputType)
public static LayerMemoryReport getMemoryReport(boolean isGraves, FeedForwardLayer lstmLayer, InputType inputType)
Copyright © 2017. All rights reserved.