public abstract static class RecurrentBlock.BaseBuilder<T extends RecurrentBlock.BaseBuilder>
extends java.lang.Object
RecurrentBlock
type of Block
.Modifier and Type | Field and Description |
---|---|
protected RNN.Activation |
activation |
protected boolean |
clipLstmState |
protected float |
dropRate |
protected double |
lstmStateClipMax |
protected double |
lstmStateClipMin |
protected int |
numStackedLayers |
protected boolean |
stateOutputs |
protected long |
stateSize |
protected boolean |
useBidirectional |
protected boolean |
useSequenceLength |
Constructor and Description |
---|
BaseBuilder() |
Modifier and Type | Method and Description |
---|---|
T |
optBidrectional(boolean useBidirectional)
Sets the optional parameter that indicates whether to use bidirectional recurrent layers.
|
T |
optDropRate(float dropRate)
Sets the drop rate of the dropout on the outputs of each RNN layer, except the last
layer.
|
T |
optStateOutput(boolean stateOutputs)
Sets the optional parameter that indicates whether to have the states as symbol outputs.
|
protected abstract T |
self() |
T |
setNumStackedLayers(int numStackedLayers)
Sets the Required number of stacked layers.
|
T |
setSequenceLength(boolean useSequenceLength)
Sets the optional parameter that indicates whether to include an extra input parameter
sequence_length to specify variable length sequence.
|
T |
setStateSize(int stateSize)
Sets the Required size of the state for each layer.
|
protected float dropRate
protected long stateSize
protected int numStackedLayers
protected double lstmStateClipMin
protected double lstmStateClipMax
protected boolean clipLstmState
protected boolean useSequenceLength
protected boolean useBidirectional
protected boolean stateOutputs
protected RNN.Activation activation
public T optDropRate(float dropRate)
dropRate
- the drop rate of the dropoutpublic T setStateSize(int stateSize)
stateSize
- the size of the state for each layerpublic T setNumStackedLayers(int numStackedLayers)
numStackedLayers
- the number of stacked layerspublic T setSequenceLength(boolean useSequenceLength)
useSequenceLength
- whether to use sequence lengthpublic T optBidrectional(boolean useBidirectional)
useBidirectional
- whether to use bidirectional recurrent layerspublic T optStateOutput(boolean stateOutputs)
stateOutputs
- whether to have the states as symbol outputprotected abstract T self()