public class KerasReshape extends KerasLayer
KerasLayer.DimOrder
className, conf, dimOrder, dropout, inboundLayerNames, inputShape, kerasMajorVersion, layer, layerName, vertex, weightL1Regularization, weightL2Regularization, weights
Constructor and Description |
---|
KerasReshape(java.util.Map<java.lang.String,java.lang.Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasReshape(java.util.Map<java.lang.String,java.lang.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.
|
InputType |
getOutputType(InputType... inputType)
Get layer output type.
|
boolean |
isInputPreProcessor()
Whether this Keras layer maps to a DL4J InputPreProcessor.
|
long[] |
targetShapeForDimOrder(long[] inputShape,
long[] targetShape) |
clearCustomLayers, clearLambdaLayers, copyWeightsToLayer, getClassName, getDimOrder, getInboundLayerNames, getInputShape, getKerasMajorVersion, getLayer, getLayerName, getNInFromConfig, getNumParams, getVertex, getWeights, isLayer, isValidInboundLayer, isVertex, registerCustomLayer, registerLambdaLayer, setInboundLayerNames, setWeights, usesRegularization
public KerasReshape(java.util.Map<java.lang.String,java.lang.Object> layerConfig) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
layerConfig
- dictionary containing Keras layer configurationInvalidKerasConfigurationException
- Invalid Keras configUnsupportedKerasConfigurationException
- Unsupported Keras configpublic KerasReshape(java.util.Map<java.lang.String,java.lang.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 boolean isInputPreProcessor()
isInputPreProcessor
in class KerasLayer
public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException
getInputPreprocessor
in class KerasLayer
inputType
- Array of InputTypesInvalidKerasConfigurationException
- Invalid Keras configInputPreProcessor
public long[] targetShapeForDimOrder(long[] inputShape, long[] targetShape)
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException
getOutputType
in class KerasLayer
inputType
- Array of InputTypesInvalidKerasConfigurationException
- Invalid Keras config