arrow-left

All pages
gitbookPowered by GitBook
1 of 11

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Normalization Layers

hashtag
KerasBatchNormalization

[source]arrow-up-right

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 
public BatchNormalization getBatchNormalizationLayer() 
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException 
public int getNumParams() 
public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException 

Local Layers

hashtag
KerasLocallyConnected1D

[source]arrow-up-right

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.

hashtag
KerasLocallyConnected2D

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 
[source]arrow-up-right
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 

Core Layers

hashtag
KerasPermute

[source]arrow-up-right

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

getInputPreprocessor

Gets appropriate DL4J InputPreProcessor for given InputTypes.

  • param inputType Array of InputTypes

  • return DL4J InputPreProcessor

  • throws InvalidKerasConfigurationException Invalid Keras config

getOutputType

Get layer output type.

  • param inputType Array of InputTypes

  • return output type as InputType

  • throws InvalidKerasConfigurationException Invalid Keras config

hashtag
KerasFlatten

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

getInputPreprocessor

Gets appropriate DL4J InputPreProcessor for given InputTypes.

  • param inputType Array of InputTypes

  • return DL4J InputPreProcessor

  • throws InvalidKerasConfigurationException Invalid Keras config

getOutputType

Get layer output type.

  • param inputType Array of InputTypes

  • return output type as InputType

  • throws InvalidKerasConfigurationException Invalid Keras config

hashtag
KerasReshape

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

getInputPreprocessor

Gets appropriate DL4J InputPreProcessor for given InputTypes.

  • param inputType Array of InputTypes

  • return DL4J InputPreProcessor

  • throws InvalidKerasConfigurationException Invalid Keras config

getOutputType

Get layer output type.

  • param inputType Array of InputTypes

  • return output type as InputType

  • throws InvalidKerasConfigurationException Invalid Keras config

hashtag
KerasMerge

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

hashtag
KerasDropout

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

getDropoutLayer

Get DL4J DropoutLayer.

  • return DropoutLayer

hashtag
KerasMasking

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

getMaskingLayer

Get DL4J MaskZeroLayer.

  • return MaskZeroLayer

hashtag
KerasSpatialDropout

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

hashtag
KerasLambda

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

getSameDiffLayer

Get DL4J SameDiffLayer.

  • return SameDiffLayer

hashtag
KerasActivation

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

getActivationLayer

Get DL4J ActivationLayer.

  • return ActivationLayer

hashtag
KerasDense

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

hashtag
KerasRepeatVector

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

getRepeatVectorLayer

Get DL4J RepeatVector.

  • return RepeatVector

public KerasPermute(Map<String, Object> layerConfig)
            throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException 

throws UnsupportedKerasConfigurationException Unsupported Keras config

see InputPreProcessor

throws UnsupportedKerasConfigurationException Unsupported Keras config

see org.deeplearning4j.nn.conf.InputPreProcessor

throws UnsupportedKerasConfigurationException Unsupported Keras config

see org.deeplearning4j.nn.conf.InputPreProcessor

throws UnsupportedKerasConfigurationException Unsupported Keras config

throws UnsupportedKerasConfigurationException Unsupported Keras config

throws UnsupportedKerasConfigurationException Unsupported Keras config

throws UnsupportedKerasConfigurationException Unsupported Keras config

throws UnsupportedKerasConfigurationException Unsupported Keras config

[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
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() 

Embedding Layers

hashtag
KerasEmbedding

[source]arrow-up-right

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

Wrapper Layers

hashtag
KerasBidirectional

Builds a DL4J Bidirectional layer from a Keras Bidirectional layer wrapper

KerasBidirectional

public KerasEmbedding() throws UnsupportedKerasConfigurationException 

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

[source]arrow-up-right
public EmbeddingSequenceLayer getEmbeddingLayer() 
public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException 
public int getNumParams() 
public void setWeights(Map<String, INDArray> weights) throws InvalidKerasConfigurationException 
public KerasBidirectional(Integer kerasVersion) throws UnsupportedKerasConfigurationException 
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 

Noise Layers

hashtag
KerasGaussianNoise

[source]arrow-up-right

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

hashtag
KerasAlphaDropout

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

hashtag
KerasGaussianDropout

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

Advanced Activations

hashtag
KerasPReLU

Imports PReLU layer from Keras

KerasPReLU

Constructor from parsed Keras layer configuration dictionary.

public KerasGaussianNoise(Integer kerasVersion) throws UnsupportedKerasConfigurationException 
[source]arrow-up-right
[source]arrow-up-right
  • 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

hashtag
KerasThresholdedReLU

[source]arrow-up-right

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

hashtag
KerasLeakyReLU

[source]arrow-up-right

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

[source]arrow-up-right
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 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() 

Pooling Layers

hashtag
KerasPooling1D

[source]arrow-up-right

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

getOutputType

Get layer output type.

  • param inputType Array of InputTypes

  • return output type as InputType

  • throws InvalidKerasConfigurationException Invalid Keras config

hashtag
KerasPoolingUtils

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

hashtag
KerasPooling3D

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

getOutputType

Get layer output type.

  • param inputType Array of InputTypes

  • return output type as InputType

  • throws InvalidKerasConfigurationException Invalid Keras config

hashtag
KerasGlobalPooling

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

getInputPreprocessor

Gets appropriate DL4J InputPreProcessor for given InputTypes.

  • param inputType Array of InputTypes

  • return DL4J InputPreProcessor

  • throws InvalidKerasConfigurationException Invalid Keras config

getOutputType

Get layer output type.

  • param inputType Array of InputTypes

  • return output type as InputType

  • throws InvalidKerasConfigurationException Invalid Keras config

hashtag
KerasPooling2D

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

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 

throws UnsupportedKerasConfigurationException Unsupported Keras config

throws UnsupportedKerasConfigurationException Unsupported Keras config

throws UnsupportedKerasConfigurationException Unsupported Keras config

see org.deeplearning4j.nn.conf.InputPreProcessor

throws UnsupportedKerasConfigurationException Unsupported Keras config

[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
[source]arrow-up-right
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 

API Reference

Keras model import API

hashtag
KerasModelImport

[source]arrow-up-right

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 ComputationGraph
see ComputationGraph

return ComputationGraph

  • throws IOException IO exception

  • throws InvalidKerasConfigurationException Invalid Keras config

  • throws UnsupportedKerasConfigurationException Unsupported Keras config

  • see ComputationGraph

  • throws IOException IO exception
  • throws InvalidKerasConfigurationException Invalid Keras config

  • throws UnsupportedKerasConfigurationException Unsupported Keras config

  • see ComputationGraph

  • throws InvalidKerasConfigurationException Invalid Keras config
  • throws UnsupportedKerasConfigurationException Unsupported Keras config

  • see ComputationGraph

  • return MultiLayerNetwork

  • throws IOException IO exception

  • see MultiLayerNetwork

  • throws IOException IO exception
  • see MultiLayerNetwork

  • see MultiLayerNetwork

    return ComputationGraph

  • throws IOException IO exception

  • see ComputationGraph

  • throws IOException IO exception
  • see ComputationGraph

  • return MultiLayerNetwork

  • throws IOException IO exception

  • see MultiLayerNetwork

  • throws IOException IO exception
  • see MultiLayerNetwork

  • throws IOException IO exception
  • see ComputationGraph

  • see ComputationGraph
    throws IOException IO exception
  • see MultiLayerNetwork

  • see MultiLayerNetwork
    public static ComputationGraph importKerasModelAndWeights( InputStream modelHdf5Stream, boolean enforceTrainingConfig)
                throws IOException, UnsupportedKerasConfigurationException, InvalidKerasConfigurationException
    public 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 

    Convolutional Layers

    hashtag
    KerasConvolution2D

    [source]arrow-up-right

    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

    hashtag
    KerasCropping2D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasUpsampling3D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasConvolution1D

    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

    setWeights

    Set weights for layer.

    • param weights Map from parameter name to INDArray.

    hashtag
    KerasUpsampling1D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasAtrousConvolution2D

    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

    hashtag
    KerasAtrousConvolution1D

    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

    hashtag
    KerasCropping3D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasZeroPadding2D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasConvolution3D

    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

    hashtag
    KerasDeconvolution2D

    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

    hashtag
    KerasZeroPadding3D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasConvolutionUtils

    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

    hashtag
    KerasZeroPadding1D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasCropping1D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasSpaceToDepth

    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

    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

    hashtag
    KerasUpsampling2D

    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

    getOutputType

    Get layer output type.

    • param inputType Array of InputTypes

    • return output type as InputType

    • throws InvalidKerasConfigurationException Invalid Keras config

    hashtag
    KerasSeparableConvolution2D

    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

    hashtag
    KerasDepthwiseConvolution2D

    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 

    throws UnsupportedKerasConfigurationException Unsupported Keras config

    throws UnsupportedKerasConfigurationException Invalid Keras configuration exception

    see org.deeplearning4j.nn.conf.InputPreProcessor

    throws UnsupportedKerasConfigurationException Invalid Keras configuration exception

    throws UnsupportedKerasConfigurationException Unsupported Keras config

    throws UnsupportedKerasConfigurationException Unsupported Keras config

    throws UnsupportedKerasConfigurationException Unsupported Keras config

    throws UnsupportedKerasConfigurationException Unsupported Keras config

    throws UnsupportedKerasConfigurationException Unsupported Keras config

    throws UnsupportedKerasConfigurationException Unsupported Keras configuration exception

    throws UnsupportedKerasConfigurationException Invalid Keras configuration exception

    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    [source]arrow-up-right
    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 

    Recurrent Layers

    hashtag
    KerasSimpleRnn

    [source]arrow-up-right

    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

    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

    hashtag
    KerasRnnUtils

    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

    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

    hashtag
    KerasLSTM

    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

    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 
    see org.deeplearning4j.nn.conf.InputPreProcessor
    throws InvalidKerasConfigurationException Invalid Keras configuration
    throws InvalidKerasConfigurationException Invalid Keras configuration
    see org.deeplearning4j.nn.conf.InputPreProcessor
    [source]arrow-up-right
    [source]arrow-up-right
    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