public class KerasSimpleRnn extends KerasLayer
KerasLayer.DimOrder| Modifier and Type | Field and Description |
|---|---|
protected boolean |
returnSequences |
protected boolean |
unroll |
className, conf, dimOrder, dropout, inboundLayerNames, inputShape, kerasMajorVersion, layer, layerName, vertex, weightL1Regularization, weightL2Regularization, weights| Constructor and Description |
|---|
KerasSimpleRnn(Integer kerasVersion)
Pass-through constructor from KerasLayer
|
KerasSimpleRnn(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasSimpleRnn(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
InputPreProcessor |
getInputPreprocessor(InputType... inputType)
Gets appropriate DL4J InputPreProcessor for given InputTypes.
|
int |
getNumParams()
Returns number of trainable parameters in layer.
|
InputType |
getOutputType(InputType... inputType)
Get layer output type.
|
Layer |
getSimpleRnnLayer()
Get DL4J SimpleRnn layer.
|
boolean |
getUnroll()
Get whether SimpleRnn layer should be unrolled (for truncated BPTT).
|
void |
setWeights(Map<String,INDArray> weights)
Set weights for layer.
|
clearCustomLayers, clearLambdaLayers, copyWeightsToLayer, getClassName, getDimOrder, getInboundLayerNames, getInputShape, getKerasMajorVersion, getLayer, getLayerName, getNInFromConfig, getVertex, getWeights, isInputPreProcessor, isLayer, isValidInboundLayer, isVertex, registerCustomLayer, registerLambdaLayer, setInboundLayerNames, usesRegularizationpublic KerasSimpleRnn(Integer kerasVersion) throws UnsupportedKerasConfigurationException
kerasVersion - major keras versionUnsupportedKerasConfigurationException - Unsupported Keras configpublic KerasSimpleRnn(Map<String,Object> layerConfig) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
layerConfig - dictionary containing Keras layer configuration.InvalidKerasConfigurationException - Invalid Keras configUnsupportedKerasConfigurationException - Unsupported Keras configpublic KerasSimpleRnn(Map<String,Object> layerConfig, boolean enforceTrainingConfig) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
layerConfig - dictionary containing Keras layer configurationenforceTrainingConfig - whether to enforce training-related configuration optionsInvalidKerasConfigurationException - Invalid Keras configUnsupportedKerasConfigurationException - Unsupported Keras configpublic Layer getSimpleRnnLayer()
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException
getOutputType in class KerasLayerinputType - Array of InputTypesInvalidKerasConfigurationException - Invalid Keras configpublic int getNumParams()
getNumParams in class KerasLayerpublic InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException
getInputPreprocessor in class KerasLayerinputType - Array of InputTypesInvalidKerasConfigurationException - Invalid Keras configuration exceptionInputPreProcessorpublic boolean getUnroll()
public void setWeights(Map<String,INDArray> weights) throws InvalidKerasConfigurationException
setWeights in class KerasLayerweights - Simple RNN weightsInvalidKerasConfigurationException - Invalid Keras configuration exceptionCopyright © 2018. All rights reserved.