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 |
batchFirst |
protected boolean |
bidirectional |
protected float |
dropRate |
protected boolean |
hasBiases |
protected int |
numLayers |
protected boolean |
returnState |
protected long |
stateSize |
Constructor and Description |
---|
BaseBuilder() |
Modifier and Type | Method and Description |
---|---|
T |
optBatchFirst(boolean batchFirst)
Sets the optional batchFirst flag that indicates whether the input is batch major or not.
|
T |
optBidirectional(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 |
optHasBiases(boolean hasBiases)
Sets the optional biases flag that indicates whether to use biases or not.
|
T |
optReturnState(boolean returnState)
Sets the optional flag that indicates whether to return state or not.
|
protected abstract T |
self() |
T |
setNumLayers(int numLayers)
Sets the Required number of stacked layers.
|
T |
setStateSize(int stateSize)
Sets the Required size of the state for each layer.
|
protected float dropRate
protected long stateSize
protected int numLayers
protected boolean batchFirst
protected boolean hasBiases
protected boolean bidirectional
protected boolean returnState
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 setNumLayers(int numLayers)
numLayers
- the number of stacked layerspublic T optBidirectional(boolean useBidirectional)
useBidirectional
- whether to use bidirectional recurrent layerspublic T optBatchFirst(boolean batchFirst)
batchFirst
- whether the input is batch major or notpublic T optHasBiases(boolean hasBiases)
hasBiases
- whether to use biases or notpublic T optReturnState(boolean returnState)
returnState
- whether to return state or notprotected abstract T self()