Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
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
public KerasPermute(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public boolean isInputPreProcessor() public InputPreProcessor getInputPreprocessor(InputType... inputType) throws
InvalidKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasFlatten(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public boolean isInputPreProcessor() public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasReshape(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public boolean isInputPreProcessor() public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasMerge(Integer kerasVersion) throws UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) public KerasDropout(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public DropoutLayer getDropoutLayer() public KerasMasking(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public MaskZeroLayer getMaskingLayer() public KerasSpatialDropout(Integer kerasVersion) throws UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public DropoutLayer getSpatialDropoutLayer() public KerasLambda(Map<String, Object> layerConfig, SameDiffLayer sameDiffLayer)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public SameDiffLayer getSameDiffLayer() public KerasActivation(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public ActivationLayer getActivationLayer() public KerasDense(Integer kerasVersion) throws UnsupportedKerasConfigurationException public DenseLayer getDenseLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public int getNumParams() public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public KerasRepeatVector(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public RepeatVector getRepeatVectorLayer() 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.
public KerasBatchNormalization(Integer kerasVersion) throws UnsupportedKerasConfigurationException 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
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
public BatchNormalization getBatchNormalizationLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public int getNumParams() public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public KerasGaussianNoise(Integer kerasVersion) throws UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public DropoutLayer getGaussianNoiseLayer() public KerasAlphaDropout(Integer kerasVersion) throws UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public DropoutLayer getAlphaDropoutLayer() public KerasGaussianDropout(Integer kerasVersion) throws UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public DropoutLayer getGaussianDropoutLayer() public KerasEmbedding() throws UnsupportedKerasConfigurationException public EmbeddingSequenceLayer getEmbeddingLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public int getNumParams() public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException 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
public KerasBidirectional(Integer kerasVersion) throws UnsupportedKerasConfigurationException 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
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
public Layer getUnderlyingRecurrentLayer() public Bidirectional getBidirectionalLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public int getNumParams() public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public static ComputationGraph importKerasModelAndWeights( InputStream modelHdf5Stream, boolean enforceTrainingConfig)
throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationExceptionpublic static ComputationGraph importKerasModelAndWeights(InputStream modelHdf5Stream) throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationException public static MultiLayerNetwork importKerasSequentialModelAndWeights(InputStream modelHdf5Stream,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static MultiLayerNetwork importKerasSequentialModelAndWeights(InputStream modelHdf5Stream)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static ComputationGraph importKerasModelAndWeights(String modelHdf5Filename, int[] inputShape,
boolean enforceTrainingConfig)
throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationException public static ComputationGraph importKerasModelAndWeights(String modelHdf5Filename, boolean enforceTrainingConfig)
throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationException public static ComputationGraph importKerasModelAndWeights(String modelHdf5Filename)
throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationException public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelHdf5Filename,
int[] inputShape,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelHdf5Filename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelHdf5Filename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static ComputationGraph importKerasModelAndWeights(String modelJsonFilename, String weightsHdf5Filename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static ComputationGraph importKerasModelAndWeights(String modelJsonFilename, String weightsHdf5Filename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelJsonFilename,
String weightsHdf5Filename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static MultiLayerNetwork importKerasSequentialModelAndWeights(String modelJsonFilename,
String weightsHdf5Filename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static ComputationGraphConfiguration importKerasModelConfiguration(String modelJsonFilename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static ComputationGraphConfiguration importKerasModelConfiguration(String modelJsonFilename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static MultiLayerConfiguration importKerasSequentialConfiguration(String modelJsonFilename,
boolean enforceTrainingConfig)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public static MultiLayerConfiguration importKerasSequentialConfiguration(String modelJsonFilename)
throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public KerasPReLU(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public PReLULayer getPReLULayer() public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public KerasThresholdedReLU(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public ActivationLayer getActivationLayer() public KerasLeakyReLU(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public ActivationLayer getActivationLayer() 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
public KerasSimpleRnn(Integer kerasVersion) throws UnsupportedKerasConfigurationException public Layer getSimpleRnnLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public int getNumParams() public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException public boolean getUnroll() public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public static boolean getUnrollRecurrentLayer(KerasLayerConfiguration conf, Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException public static double getRecurrentDropout(KerasLayerConfiguration conf, Map<String, Object> layerConfig)
throws UnsupportedKerasConfigurationException, InvalidKerasConfigurationException public KerasLSTM(Integer kerasVersion) throws UnsupportedKerasConfigurationException public Layer getLSTMLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public int getNumParams() public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public boolean getUnroll() public IActivation getGateActivationFromConfig(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public double getForgetBiasInitFromConfig(Map<String, Object> layerConfig, boolean train)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException 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
public KerasConvolution2D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public ConvolutionLayer getConvolution2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasCropping2D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public Cropping2D getCropping2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasUpsampling3D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public Upsampling3D getUpsampling3DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasConvolution1D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public Convolution1DLayer getConvolution1DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public KerasUpsampling1D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public Upsampling1D getUpsampling1DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasAtrousConvolution2D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public ConvolutionLayer getAtrousConvolution2D() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasAtrousConvolution1D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public Convolution1DLayer getAtrousConvolution1D() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasCropping3D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public Cropping3D getCropping3DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasZeroPadding2D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public ZeroPaddingLayer getZeroPadding2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasConvolution3D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public ConvolutionLayer getConvolution3DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasDeconvolution2D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public Deconvolution2D getDeconvolution2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasZeroPadding3D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public ZeroPadding3DLayer getZeroPadding3DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public static ConvolutionMode getConvolutionModeFromConfig(Map<String, Object> layerConfig,
KerasLayerConfiguration conf)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public KerasZeroPadding1D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public ZeroPadding1DLayer getZeroPadding1DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasCropping1D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public Cropping1D getCropping1DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasSpaceToDepth(Map<String, Object> layerConfig, boolean enforceTrainingConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public SpaceToDepthLayer getSpaceToDepthLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasUpsampling2D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public Upsampling2D getUpsampling2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasSeparableConvolution2D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public SeparableConvolution2D getSeparableConvolution2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasDepthwiseConvolution2D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public DepthwiseConvolution2D getDepthwiseConvolution2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException 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.
public KerasLocallyConnected1D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public LocallyConnected1D getLocallyConnected1DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException public KerasLocallyConnected2D(Integer kerasVersion) throws UnsupportedKerasConfigurationException public LocallyConnected2D getLocallyConnected2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException 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
public KerasPooling1D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public Subsampling1DLayer getSubsampling1DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public static PoolingType mapPoolingType(String className, KerasLayerConfiguration conf)
throws UnsupportedKerasConfigurationException public KerasPooling3D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public Subsampling3DLayer getSubsampling3DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasGlobalPooling(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public GlobalPoolingLayer getGlobalPoolingLayer() public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException public KerasPooling2D(Map<String, Object> layerConfig)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException public SubsamplingLayer getSubsampling2DLayer() public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException