Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Imports a 1D locally connected layer from Keras.
KerasLocallyConnected1D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getLocallyConnected1DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
setWeights
Set weights for 1D locally connected layer.
param weights Map from parameter name to INDArray.
Imports a 2D locally connected layer from Keras.
KerasLocallyConnected2D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getLocallyConnected2DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
setWeights
Set weights for 2D locally connected layer.
param weights Map from parameter name to INDArray.
Imports an Embedding layer from Keras.
KerasEmbedding
Pass through constructor for unit tests
throws UnsupportedKerasConfigurationException Unsupported Keras config
getEmbeddingLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
getNumParams
Returns number of trainable parameters in layer.
return number of trainable parameters (1)
setWeights
Set weights for layer.
param weights Embedding layer weights
Imports Permute layer from Keras
KerasPermute
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
isInputPreProcessor
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getInputPreprocessor
Gets appropriate DL4J InputPreProcessor for given InputTypes.
param inputType Array of InputTypes
return DL4J InputPreProcessor
throws InvalidKerasConfigurationException Invalid Keras config
see InputPreProcessor
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras Flatten layer as a DL4J {Cnn,Rnn}ToFeedForwardInputPreProcessor.
KerasFlatten
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
isInputPreProcessor
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getInputPreprocessor
Gets appropriate DL4J InputPreProcessor for given InputTypes.
param inputType Array of InputTypes
return DL4J InputPreProcessor
throws InvalidKerasConfigurationException Invalid Keras config
see org.deeplearning4j.nn.conf.InputPreProcessor
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports Reshape layer from Keras
KerasReshape
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
isInputPreProcessor
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getInputPreprocessor
Gets appropriate DL4J InputPreProcessor for given InputTypes.
param inputType Array of InputTypes
return DL4J InputPreProcessor
throws InvalidKerasConfigurationException Invalid Keras config
see org.deeplearning4j.nn.conf.InputPreProcessor
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras Merge layer as a DL4J Merge (graph) vertex.
TODO: handle axes arguments that alter merge behavior (requires changes to DL4J?)
KerasMerge
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
Imports a Dropout layer from Keras.
KerasDropout
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getDropoutLayer
Get DL4J DropoutLayer.
return DropoutLayer
Imports Keras masking layers.
KerasMasking
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getMaskingLayer
Get DL4J MaskZeroLayer.
return MaskZeroLayer
Keras wrapper for DL4J dropout layer with SpatialDropout, works 1D-3D.
KerasSpatialDropout
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getSpatialDropoutLayer
Get DL4J DropoutLayer with spatial dropout.
return DropoutLayer
Wraps a DL4J SameDiffLambda into a KerasLayer
KerasLambda
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getSameDiffLayer
Get DL4J SameDiffLayer.
return SameDiffLayer
Imports an Activation layer from Keras.
KerasActivation
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getActivationLayer
Get DL4J ActivationLayer.
return ActivationLayer
Imports a Dense layer from Keras.
KerasDense
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getDenseLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
getNumParams
Returns number of trainable parameters in layer.
return number of trainable parameters (2)
setWeights
Set weights for layer.
param weights Dense layer weights
Imports a Keras RepeatVector layer
KerasRepeatVector
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getRepeatVectorLayer
Get DL4J RepeatVector.
return RepeatVector
Keras wrapper for DL4J dropout layer with GaussianNoise.
KerasGaussianNoise
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getGaussianNoiseLayer
Get DL4J DropoutLayer with Gaussian dropout.
return DropoutLayer
Keras wrapper for DL4J dropout layer with AlphaDropout.
KerasAlphaDropout
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getAlphaDropoutLayer
Get DL4J DropoutLayer with Alpha dropout.
return DropoutLayer
Keras wrapper for DL4J dropout layer with GaussianDropout.
KerasGaussianDropout
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Invalid Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getGaussianDropoutLayer
Get DL4J DropoutLayer with Gaussian dropout.
return DropoutLayer
Keras model import API
Reads stored Keras configurations and weights from one of two archives: either as
a single HDF5 file storing model and training JSON configurations and weights
separate text file storing model JSON configuration and HDF5 file storing weights.
importKerasModelAndWeights
Load Keras (Functional API) Model saved using model.save_model(…).
param modelHdf5Stream InputStream containing HDF5 archive storing Keras Model
param enforceTrainingConfig whether to enforce training configuration options
return ComputationGraph
see ComputationGraph
importKerasModelAndWeights
Load Keras (Functional API) Model saved using model.save_model(…).
param modelHdf5Stream InputStream containing HDF5 archive storing Keras Model
return ComputationGraph
see ComputationGraph
importKerasSequentialModelAndWeights
Load Keras Sequential model saved using model.save_model(…).
param modelHdf5Stream InputStream containing HDF5 archive storing Keras Sequential model
param enforceTrainingConfig whether to enforce training configuration options
return ComputationGraph
see ComputationGraph
importKerasSequentialModelAndWeights
Load Keras Sequential model saved using model.save_model(…).
param modelHdf5Stream InputStream containing HDF5 archive storing Keras Sequential model
return ComputationGraph
see ComputationGraph
importKerasModelAndWeights
Load Keras (Functional API) Model saved using model.save_model(…).
param modelHdf5Filename path to HDF5 archive storing Keras Model
param inputShape optional input shape for models that come without such (e.g. notop = false models)
param enforceTrainingConfig whether to enforce training configuration options
return ComputationGraph
throws IOException IO exception
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
see ComputationGraph
importKerasModelAndWeights
Load Keras (Functional API) Model saved using model.save_model(…).
param modelHdf5Filename path to HDF5 archive storing Keras Model
param enforceTrainingConfig whether to enforce training configuration options
return ComputationGraph
throws IOException IO exception
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
see ComputationGraph
importKerasModelAndWeights
Load Keras (Functional API) Model saved using model.save_model(…).
param modelHdf5Filename path to HDF5 archive storing Keras Model
return ComputationGraph
throws IOException IO exception
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
see ComputationGraph
importKerasSequentialModelAndWeights
Load Keras Sequential model saved using model.save_model(…).
param modelHdf5Filename path to HDF5 archive storing Keras Sequential model
param inputShape optional input shape for models that come without such (e.g. notop = false models)
param enforceTrainingConfig whether to enforce training configuration options
return MultiLayerNetwork
throws IOException IO exception
see MultiLayerNetwork
importKerasSequentialModelAndWeights
Load Keras Sequential model saved using model.save_model(…).
param modelHdf5Filename path to HDF5 archive storing Keras Sequential model
param enforceTrainingConfig whether to enforce training configuration options
return MultiLayerNetwork
throws IOException IO exception
see MultiLayerNetwork
importKerasSequentialModelAndWeights
Load Keras Sequential model saved using model.save_model(…).
param modelHdf5Filename path to HDF5 archive storing Keras Sequential model
return MultiLayerNetwork
throws IOException IO exception
see MultiLayerNetwork
importKerasModelAndWeights
Load Keras (Functional API) Model for which the configuration and weights were saved separately using calls to model.to_json() and model.save_weights(…).
param modelJsonFilename path to JSON file storing Keras Model configuration
param weightsHdf5Filename path to HDF5 archive storing Keras model weights
param enforceTrainingConfig whether to enforce training configuration options
return ComputationGraph
throws IOException IO exception
see ComputationGraph
importKerasModelAndWeights
Load Keras (Functional API) Model for which the configuration and weights were saved separately using calls to model.to_json() and model.save_weights(…).
param modelJsonFilename path to JSON file storing Keras Model configuration
param weightsHdf5Filename path to HDF5 archive storing Keras model weights
return ComputationGraph
throws IOException IO exception
see ComputationGraph
importKerasSequentialModelAndWeights
Load Keras Sequential model for which the configuration and weights were saved separately using calls to model.to_json() and model.save_weights(…).
param modelJsonFilename path to JSON file storing Keras Sequential model configuration
param weightsHdf5Filename path to HDF5 archive storing Keras model weights
param enforceTrainingConfig whether to enforce training configuration options
return MultiLayerNetwork
throws IOException IO exception
see MultiLayerNetwork
importKerasSequentialModelAndWeights
Load Keras Sequential model for which the configuration and weights were saved separately using calls to model.to_json() and model.save_weights(…).
param modelJsonFilename path to JSON file storing Keras Sequential model configuration
param weightsHdf5Filename path to HDF5 archive storing Keras model weights
return MultiLayerNetwork
throws IOException IO exception
see MultiLayerNetwork
importKerasModelConfiguration
Load Keras (Functional API) Model for which the configuration was saved separately using calls to model.to_json() and model.save_weights(…).
param modelJsonFilename path to JSON file storing Keras Model configuration
param enforceTrainingConfig whether to enforce training configuration options
return ComputationGraph
throws IOException IO exception
see ComputationGraph
importKerasModelConfiguration
Load Keras (Functional API) Model for which the configuration was saved separately using calls to model.to_json() and model.save_weights(…).
param modelJsonFilename path to JSON file storing Keras Model configuration
return ComputationGraph
throws IOException IO exception
see ComputationGraph
importKerasSequentialConfiguration
Load Keras Sequential model for which the configuration was saved separately using calls to model.to_json() and model.save_weights(…).
param modelJsonFilename path to JSON file storing Keras Sequential model configuration
param enforceTrainingConfig whether to enforce training configuration options
return MultiLayerNetwork
throws IOException IO exception
see MultiLayerNetwork
importKerasSequentialConfiguration
Load Keras Sequential model for which the configuration was saved separately using calls to model.to_json() and model.save_weights(…).
param modelJsonFilename path to JSON file storing Keras Sequential model configuration
return MultiLayerNetwork
throws IOException IO exception
see MultiLayerNetwork
Imports a Keras 1D Pooling layer as a DL4J Subsampling layer.
KerasPooling1D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getSubsampling1DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Utility functionality for Keras pooling layers.
mapPoolingType
Map Keras pooling layers to DL4J pooling types.
param className name of the Keras pooling class
return DL4J pooling type
throws UnsupportedKerasConfigurationException Unsupported Keras config
Imports a Keras 3D Pooling layer as a DL4J Subsampling3D layer.
KerasPooling3D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getSubsampling3DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras Pooling layer as a DL4J Subsampling layer.
KerasGlobalPooling
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getGlobalPoolingLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getInputPreprocessor
Gets appropriate DL4J InputPreProcessor for given InputTypes.
param inputType Array of InputTypes
return DL4J InputPreProcessor
throws InvalidKerasConfigurationException Invalid Keras config
see org.deeplearning4j.nn.conf.InputPreProcessor
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras 2D Pooling layer as a DL4J Subsampling layer.
KerasPooling2D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getSubsampling2DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a 2D Convolution layer from Keras.
KerasConvolution2D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getConvolution2DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras Cropping 2D layer.
KerasCropping2D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getCropping2DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Keras Upsampling3D layer support
KerasUpsampling3D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras configuration exception
throws UnsupportedKerasConfigurationException Unsupported Keras configuration exception
getUpsampling3DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras configuration exception
throws UnsupportedKerasConfigurationException Invalid Keras configuration exception
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a 1D Convolution layer from Keras.
KerasConvolution1D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException
getConvolution1DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException
throws UnsupportedKerasConfigurationException
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException
getInputPreprocessor
Gets appropriate DL4J InputPreProcessor for given InputTypes.
param inputType Array of InputTypes
return DL4J InputPreProcessor
throws InvalidKerasConfigurationException Invalid Keras configuration exception
see org.deeplearning4j.nn.conf.InputPreProcessor
setWeights
Set weights for layer.
param weights Map from parameter name to INDArray.
Keras Upsampling1D layer support
KerasUpsampling1D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras configuration exception
throws UnsupportedKerasConfigurationException Unsupported Keras configuration exception
getUpsampling1DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras configuration exception
throws UnsupportedKerasConfigurationException Invalid Keras configuration exception
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Keras 1D atrous / dilated convolution layer. Note that in keras 2 this layer has been removed and dilations are now available through the “dilated” argument in regular Conv1D layers
author: Max Pumperla
KerasAtrousConvolution2D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getAtrousConvolution2D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Keras 1D atrous / dilated convolution layer. Note that in keras 2 this layer has been removed and dilations are now available through the “dilated” argument in regular Conv1D layers
author: Max Pumperla
KerasAtrousConvolution1D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getAtrousConvolution1D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras Cropping 3D layer.
KerasCropping3D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getCropping3DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras ZeroPadding 2D layer.
KerasZeroPadding2D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getZeroPadding2DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a 3D Convolution layer from Keras.
KerasConvolution3D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getConvolution3DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a 2D Deconvolution layer from Keras.
KerasDeconvolution2D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getDeconvolution2DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras ZeroPadding 3D layer.
KerasZeroPadding3D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getZeroPadding3DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Utility functionality for Keras convolution layers.
getConvolutionModeFromConfig
Get (convolution) stride from Keras layer configuration.
param layerConfig dictionary containing Keras layer configuration
return Strides array from Keras configuration
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras ZeroPadding 1D layer.
KerasZeroPadding1D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getZeroPadding1DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports a Keras Cropping 1D layer.
KerasCropping1D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getCropping1DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Constructor from parsed Keras layer configuration dictionary.
KerasSpaceToDepth
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras configuration exception
throws UnsupportedKerasConfigurationException Unsupported Keras configuration exception
getSpaceToDepthLayer
Get DL4J SpaceToDepth layer.
return SpaceToDepth layer
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Keras Upsampling2D layer support
KerasUpsampling2D
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras configuration exception
throws UnsupportedKerasConfigurationException Unsupported Keras configuration exception
getUpsampling2DLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras configuration exception
throws UnsupportedKerasConfigurationException Invalid Keras configuration exception
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Keras separable convolution 2D layer support
KerasSeparableConvolution2D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras configuration
setWeights
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras configuration
throws UnsupportedKerasConfigurationException Unsupported Keras configuration
getSeparableConvolution2DLayer
Get DL4J SeparableConvolution2D.
return SeparableConvolution2D
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Keras depth-wise convolution 2D layer support
KerasDepthwiseConvolution2D
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras configuration
setWeights
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras configuration
throws UnsupportedKerasConfigurationException Unsupported Keras configuration
getDepthwiseConvolution2DLayer
Get DL4J DepthwiseConvolution2D.
return DepthwiseConvolution2D
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
Imports PReLU layer from Keras
KerasPReLU
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Invalid Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Invalid Keras config
getPReLULayer
Get DL4J ActivationLayer.
return ActivationLayer
setWeights
Set weights for layer.
param weights Dense layer weights
Imports ThresholdedReLU layer from Keras
KerasThresholdedReLU
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Invalid Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Invalid Keras config
getActivationLayer
Get DL4J ActivationLayer.
return ActivationLayer
Imports LeakyReLU layer from Keras
KerasLeakyReLU
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Invalid Keras config
getOutputType
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
param enforceTrainingConfig whether to enforce training-related configuration options
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Invalid Keras config
getActivationLayer
Get DL4J ActivationLayer.
return ActivationLayer
Builds a DL4J Bidirectional layer from a Keras Bidirectional layer wrapper
KerasBidirectional
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getUnderlyingRecurrentLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getBidirectionalLayer
Get DL4J Bidirectional layer.
return Bidirectional Layer
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
getNumParams
Returns number of trainable parameters in layer.
return number of trainable parameters
getInputPreprocessor
Gets appropriate DL4J InputPreProcessor for given InputTypes.
param inputType Array of InputTypes
return DL4J InputPreProcessor
throws InvalidKerasConfigurationException Invalid Keras configuration exception
see org.deeplearning4j.nn.conf.InputPreProcessor
setWeights
Set weights for Bidirectional layer.
param weights Map of weights
Imports a Keras SimpleRNN layer as a DL4J SimpleRnn layer.
KerasSimpleRnn
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getSimpleRnnLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
getNumParams
Returns number of trainable parameters in layer.
return number of trainable parameters (12)
getInputPreprocessor
Gets appropriate DL4J InputPreProcessor for given InputTypes.
param inputType Array of InputTypes
return DL4J InputPreProcessor
throws InvalidKerasConfigurationException Invalid Keras configuration exception
see org.deeplearning4j.nn.conf.InputPreProcessor
getUnroll
Get whether SimpleRnn layer should be unrolled (for truncated BPTT).
return whether RNN should be unrolled (boolean)
setWeights
Set weights for layer.
param weights Simple RNN weights
throws InvalidKerasConfigurationException Invalid Keras configuration exception
Utility functions for Keras RNN layers
getUnrollRecurrentLayer
Get unroll parameter to decide whether to unroll RNN with BPTT or not.
param conf KerasLayerConfiguration
param layerConfig dictionary containing Keras layer properties
return boolean unroll parameter
throws InvalidKerasConfigurationException Invalid Keras configuration
getRecurrentDropout
Get recurrent weight dropout from Keras layer configuration. Non-zero dropout rates are currently not supported.
param conf KerasLayerConfiguration
param layerConfig dictionary containing Keras layer properties
return recurrent dropout rate
throws InvalidKerasConfigurationException Invalid Keras configuration
Imports a Keras LSTM layer as a DL4J LSTM layer.
KerasLSTM
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getLSTMLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration.
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
getNumParams
Returns number of trainable parameters in layer.
return number of trainable parameters (12)
getInputPreprocessor
Gets appropriate DL4J InputPreProcessor for given InputTypes.
param inputType Array of InputTypes
return DL4J InputPreProcessor
throws InvalidKerasConfigurationException Invalid Keras configuration exception
see org.deeplearning4j.nn.conf.InputPreProcessor
setWeights
Set weights for layer.
param weights LSTM layer weights
getUnroll
Get whether LSTM layer should be unrolled (for truncated BPTT).
return whether to unroll the LSTM
getGateActivationFromConfig
Get LSTM gate activation function from Keras layer configuration.
param layerConfig dictionary containing Keras layer configuration
return LSTM inner activation function
throws InvalidKerasConfigurationException Invalid Keras config
getForgetBiasInitFromConfig
Get LSTM forget gate bias initialization from Keras layer configuration.
param layerConfig dictionary containing Keras layer configuration
return LSTM forget gate bias init
throws InvalidKerasConfigurationException Unsupported Keras config
Imports a BatchNormalization layer from Keras.
KerasBatchNormalization
Pass-through constructor from KerasLayer
param kerasVersion major keras version
throws UnsupportedKerasConfigurationException Unsupported Keras config
getBatchNormalizationLayer
Constructor from parsed Keras layer configuration dictionary.
param layerConfig dictionary containing Keras layer configuration
throws InvalidKerasConfigurationException Invalid Keras config
throws UnsupportedKerasConfigurationException Unsupported Keras config
getOutputType
Get layer output type.
param inputType Array of InputTypes
return output type as InputType
throws InvalidKerasConfigurationException Invalid Keras config
getNumParams
Returns number of trainable parameters in layer.
return number of trainable parameters (4)
setWeights
Set weights for layer.
param weights Map from parameter name to INDArray.