| Modifier and Type | Method and Description |
|---|---|
static void |
KerasLayer.checkForUnsupportedConfigurations(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Checks whether layer config contains unsupported options.
|
void |
KerasLayer.copyWeightsToLayer(Layer layer)
Copy Keras layer weights to DL4J Layer.
|
protected org.nd4j.linalg.activations.IActivation |
KerasLayer.getActivationFromConfig(Map<String,Object> layerConfig)
Get activation function from Keras layer configuration.
|
static double |
KerasLayer.getBiasL1RegularizationFromConfig(Map<String,Object> layerConfig,
boolean willBeTrained)
Get L1 bias regularization (if any) from Keras bias regularization configuration.
|
static String |
KerasLayer.getClassNameFromConfig(Map<String,Object> layerConfig)
Get Keras layer class name from Keras layer configuration.
|
ComputationGraph |
KerasModel.getComputationGraph()
Build a ComputationGraph from this Keras Model configuration and import weights.
|
ComputationGraph |
KerasModel.getComputationGraph(boolean importWeights)
Build a ComputationGraph from this Keras Model configuration and (optionally) import weights.
|
ComputationGraphConfiguration |
KerasModel.getComputationGraphConfiguration()
Configure a ComputationGraph from this Keras Model configuration.
|
static ConvolutionMode |
KerasLayer.getConvolutionModeFromConfig(Map<String,Object> layerConfig)
Get convolution border mode from Keras layer configuration.
|
protected double |
KerasLayer.getDropoutFromConfig(Map<String,Object> layerConfig)
Get dropout from Keras layer configuration.
|
static Map<String,Object> |
KerasLayer.getInnerLayerConfigFromConfig(Map<String,Object> layerConfig)
Get inner layer config from Keras layer configuration.
|
InputPreProcessor |
KerasLayer.getInputPreprocessor(InputType... inputType)
Gets appropriate DL4J InputPreProcessor for given InputTypes.
|
static KerasLayer |
KerasLayer.getKerasLayerFromConfig(Map<String,Object> layerConfig)
Build KerasLayer from a Keras layer configuration.
|
static KerasLayer |
KerasLayer.getKerasLayerFromConfig(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Build KerasLayer from a Keras layer configuration.
|
static int[] |
KerasLayer.getKernelSizeFromConfig(Map<String,Object> layerConfig)
Get (convolution) kernel size from Keras layer configuration.
|
protected String |
KerasLayer.getLayerNameFromConfig(Map<String,Object> layerConfig)
Get layer name from Keras layer configuration.
|
MultiLayerConfiguration |
KerasSequentialModel.getMultiLayerConfiguration()
Configure a MultiLayerConfiguration from this Keras Sequential model configuration.
|
MultiLayerNetwork |
KerasSequentialModel.getMultiLayerNetwork()
Build a MultiLayerNetwork from this Keras Sequential model configuration.
|
MultiLayerNetwork |
KerasSequentialModel.getMultiLayerNetwork(boolean importWeights)
Build a MultiLayerNetwork from this Keras Sequential model configuration and import weights.
|
static int |
KerasLayer.getNOutFromConfig(Map<String,Object> layerConfig)
Get number of outputs from Keras layer configuration.
|
InputType |
KerasLayer.getOutputType(InputType... inputType)
Get layer output type.
|
int[] |
KerasLayer.getPaddingFromBorderModeConfig(Map<String,Object> layerConfig)
Get (convolution) padding from Keras layer configuration.
|
static int[] |
KerasLayer.getStrideFromConfig(Map<String,Object> layerConfig)
Get (convolution) stride from Keras layer configuration.
|
static Map<String,Object> |
KerasLayer.getTimeDistributedLayerConfig(Map<String,Object> layerConfig)
Extract inner layer config from TimeDistributed configuration and merge
it into the outer config.
|
protected WeightInit |
KerasLayer.getWeightInitFromConfig(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Get weight initialization from Keras layer configuration.
|
static double |
KerasLayer.getWeightL1RegularizationFromConfig(Map<String,Object> layerConfig,
boolean willBeTrained)
Get L1 weight regularization (if any) from Keras weight regularization configuration.
|
static double |
KerasLayer.getWeightL2RegularizationFromConfig(Map<String,Object> layerConfig,
boolean willBeTrained)
Get L2 weight regularization (if any) from Keras weight regularization configuration.
|
protected Model |
KerasModel.helperCopyWeightsToModel(Model model)
Helper function to import weights from nested Map into existing model.
|
protected void |
KerasModel.helperImportTrainingConfiguration(String trainingConfigJson)
Helper method called from constructor.
|
protected void |
KerasModel.helperImportWeights(Hdf5Archive weightsArchive,
String weightsRoot)
Store weights to import with each associated Keras layer.
|
protected void |
KerasModel.helperInferOutputTypes()
Helper method called from constructor.
|
protected void |
KerasModel.helperPrepareLayers(List<Object> layerConfigs)
Helper method called from constructor.
|
static ComputationGraphConfiguration |
ModelConfiguration.importFunctionalApiConfig(String modelJson)
Deprecated.
Use
KerasModel instead |
static ComputationGraphConfiguration |
ModelConfiguration.importFunctionalApiConfigFromFile(String modelJsonFilename)
Deprecated.
|
static ComputationGraphConfiguration |
ModelConfiguration.importFunctionalApiConfigFromInputStream(InputStream inputStream)
Deprecated.
|
static ComputationGraph |
Model.importFunctionalApiModel(String modelHdf5Filename)
Deprecated.
|
static ComputationGraph |
Model.importFunctionalApiModel(String configJsonFilename,
String weightsHdf5Filename)
Deprecated.
|
static ComputationGraph |
Model.importFunctionalApiModelInputStream(InputStream modelHdf5Stream)
Deprecated.
|
static ComputationGraph |
KerasModelImport.importKerasModelAndWeights(String modelHdf5Filename)
Load Keras (Functional API) Model saved using model.save_model(...).
|
static ComputationGraph |
KerasModelImport.importKerasModelAndWeights(String modelHdf5Filename,
boolean enforceTrainingConfig)
Load Keras (Functional API) Model saved using model.save_model(...).
|
static ComputationGraph |
KerasModelImport.importKerasModelAndWeights(String modelJsonFilename,
String weightsHdf5Filename)
Load Keras (Functional API) Model for which the configuration and weights were
saved separately using calls to model.to_json() and model.save_weights(...).
|
static ComputationGraph |
KerasModelImport.importKerasModelAndWeights(String modelJsonFilename,
String weightsHdf5Filename,
boolean enforceTrainingConfig)
Load Keras (Functional API) Model for which the configuration and weights were
saved separately using calls to model.to_json() and model.save_weights(...).
|
static ComputationGraphConfiguration |
KerasModelImport.importKerasModelConfiguration(String modelJsonFilename)
Load Keras (Functional API) Model for which the configuration was saved
separately using calls to model.to_json() and model.save_weights(...).
|
static ComputationGraphConfiguration |
KerasModelImport.importKerasModelConfiguration(String modelJsonFilename,
boolean enforceTrainingConfig)
Load Keras (Functional API) Model for which the configuration was saved
separately using calls to model.to_json() and model.save_weights(...).
|
static MultiLayerConfiguration |
KerasModelImport.importKerasSequentialConfiguration(String modelJsonFilename)
Load Keras Sequential model for which the configuration was saved
separately using calls to model.to_json() and model.save_weights(...).
|
static MultiLayerConfiguration |
KerasModelImport.importKerasSequentialConfiguration(String modelJsonFilename,
boolean enforceTrainingConfig)
Load Keras Sequential model for which the configuration was saved
separately using calls to model.to_json() and model.save_weights(...).
|
static MultiLayerNetwork |
KerasModelImport.importKerasSequentialModelAndWeights(InputStream modelHdf5Stream)
Load Keras Sequential model saved using model.save_model(...).
|
static MultiLayerNetwork |
KerasModelImport.importKerasSequentialModelAndWeights(InputStream modelHdf5Stream,
boolean enforceTrainingConfig)
Load Keras Sequential model saved using model.save_model(...).
|
static MultiLayerNetwork |
KerasModelImport.importKerasSequentialModelAndWeights(String modelHdf5Filename)
Load Keras Sequential model saved using model.save_model(...).
|
static MultiLayerNetwork |
KerasModelImport.importKerasSequentialModelAndWeights(String modelHdf5Filename,
boolean enforceTrainingConfig)
Load Keras Sequential model saved using model.save_model(...).
|
static MultiLayerNetwork |
KerasModelImport.importKerasSequentialModelAndWeights(String modelJsonFilename,
String weightsHdf5Filename)
Load Keras Sequential model for which the configuration and weights were
saved separately using calls to model.to_json() and model.save_weights(...).
|
static MultiLayerNetwork |
KerasModelImport.importKerasSequentialModelAndWeights(String modelJsonFilename,
String weightsHdf5Filename,
boolean enforceTrainingConfig)
Load Keras Sequential model for which the configuration and weights were
saved separately using calls to model.to_json() and model.save_weights(...).
|
static Model |
Model.importModel(String modelHdf5Filename)
Deprecated.
|
static Model |
Model.importModel(String configJsonFilename,
String weightsHdf5Filename)
Deprecated.
|
static Model |
Model.importModelInputStream(InputStream modelHdf5Stream)
Deprecated.
|
static MultiLayerNetwork |
Model.importSequentialModel(String modelHdf5Filename)
Deprecated.
|
static MultiLayerNetwork |
Model.importSequentialModel(String configJsonFilename,
String weightsHdf5Filename)
Deprecated.
|
static MultiLayerConfiguration |
ModelConfiguration.importSequentialModelConfig(String modelJson)
Deprecated.
Use
KerasSequentialModel instead |
static MultiLayerConfiguration |
ModelConfiguration.importSequentialModelConfigFromFile(String modelJsonFilename)
Deprecated.
|
static MultiLayerConfiguration |
ModelConfiguration.importSequentialModelConfigFromInputStream(InputStream inputStream)
Deprecated.
|
static MultiLayerNetwork |
Model.importSequentialModelInputStream(InputStream modelHdf5Stream)
Deprecated.
|
boolean |
KerasLayer.isValidInboundLayer()
Indicates whether this layer a valid inbound layer.
|
void |
KerasLayer.setWeights(Map<String,org.nd4j.linalg.api.ndarray.INDArray> weights)
Set weights for Keras layer.
|
| Constructor and Description |
|---|
KerasLayer(Map<String,Object> layerConfig)
Constructor.
|
KerasLayer(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor.
|
KerasModel(org.deeplearning4j.nn.modelimport.keras.KerasModel.ModelBuilder modelBuilder)
(Recommended) Builder-pattern constructor for (Functional API) Model.
|
KerasModel(String modelJson,
String modelYaml,
Hdf5Archive weightsArchive,
String weightsRoot,
String trainingJson,
Hdf5Archive trainingArchive,
boolean enforceTrainingConfig)
(Not recommended) Constructor for (Functional API) Model from model configuration
(JSON or YAML), training configuration (JSON), weights, and "training mode"
boolean indicator.
|
KerasSequentialModel(org.deeplearning4j.nn.modelimport.keras.KerasModel.ModelBuilder modelBuilder)
(Recommended) Builder-pattern constructor for Sequential model.
|
KerasSequentialModel(String modelJson,
String modelYaml,
Hdf5Archive weightsArchive,
String weightsRoot,
String trainingJson,
Hdf5Archive trainingArchive,
boolean enforceTrainingConfig)
(Not recommended) Constructor for Sequential model from model configuration
(JSON or YAML), training configuration (JSON), weights, and "training mode"
boolean indicator.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
KerasBatchNormalization.getBatchNormAxis(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Get BatchNormalization axis from Keras layer configuration.
|
protected int |
KerasBatchNormalization.getBatchNormMode(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Get BatchNormalization "mode" from Keras layer configuration.
|
protected void |
KerasBatchNormalization.getBetaRegularizerFromConfig(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Get BatchNormalization beta regularizer from Keras layer configuration.
|
protected double |
KerasBatchNormalization.getEpsFromConfig(Map<String,Object> layerConfig)
Get BatchNormalization epsilon parameter from Keras layer configuration.
|
static double |
KerasLstm.getForgetBiasInitFromConfig(Map<String,Object> layerConfig,
boolean train)
Get LSTM forget gate bias initialization from Keras layer configuration.
|
protected void |
KerasBatchNormalization.getGammaRegularizerFromConfig(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Get BatchNormalization gamma regularizer from Keras layer configuration.
|
static org.nd4j.linalg.activations.IActivation |
KerasLstm.getGateActivationFromConfig(Map<String,Object> layerConfig)
Get LSTM gate activation function from Keras layer configuration.
|
InputPreProcessor |
KerasFlatten.getInputPreprocessor(InputType... inputType)
Gets appropriate DL4J InputPreProcessor for given InputTypes.
|
InputPreProcessor |
KerasGlobalPooling.getInputPreprocessor(InputType... inputType)
Gets appropriate DL4J InputPreProcessor for given InputTypes.
|
ElementWiseVertex.Op |
KerasMerge.getMergeMode(Map<String,Object> layerConfig) |
protected double |
KerasBatchNormalization.getMomentumFromConfig(Map<String,Object> layerConfig)
Get BatchNormalization momentum parameter from Keras layer configuration.
|
InputType |
KerasActivation.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasInput.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasLoss.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasZeroPadding.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasLstm.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasFlatten.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasDense.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasBatchNormalization.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasDropout.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasConvolution.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasEmbedding.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasGlobalPooling.getOutputType(InputType... inputType)
Get layer output type.
|
InputType |
KerasPooling.getOutputType(InputType... inputType)
Get layer output type.
|
int[] |
KerasZeroPadding.getPaddingFromConfig(Map<String,Object> layerConfig)
Get zero padding from Keras layer configuration.
|
static double |
KerasLstm.getRecurrentDropout(Map<String,Object> layerConfig)
Get LSTM recurrent weight dropout from Keras layer configuration.
|
static WeightInit |
KerasLstm.getRecurrentWeightInitFromConfig(Map<String,Object> layerConfig,
boolean train)
Get LSTM recurrent weight initialization from Keras layer configuration.
|
static boolean |
KerasLstm.getUnrollRecurrentLayer(Map<String,Object> layerConfig) |
void |
KerasLstm.setWeights(Map<String,org.nd4j.linalg.api.ndarray.INDArray> weights)
Set weights for layer.
|
void |
KerasDense.setWeights(Map<String,org.nd4j.linalg.api.ndarray.INDArray> weights)
Set weights for layer.
|
void |
KerasBatchNormalization.setWeights(Map<String,org.nd4j.linalg.api.ndarray.INDArray> weights)
Set weights for layer.
|
void |
KerasConvolution.setWeights(Map<String,org.nd4j.linalg.api.ndarray.INDArray> weights)
Set weights for layer.
|
void |
KerasEmbedding.setWeights(Map<String,org.nd4j.linalg.api.ndarray.INDArray> weights)
Set weights for layer.
|
| Constructor and Description |
|---|
KerasActivation(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasActivation(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasBatchNormalization(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasBatchNormalization(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasConvolution(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasConvolution(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasDense(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasDense(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasDropout(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasDropout(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasEmbedding(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasEmbedding(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasFlatten(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasFlatten(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasGlobalPooling(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasGlobalPooling(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasInput(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasInput(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasLstm(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasLstm(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasMerge(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasMerge(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasPooling(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasPooling(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasZeroPadding(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasZeroPadding(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
InputType |
KerasLRN.getOutputType(InputType... inputType)
Get layer output type.
|
| Constructor and Description |
|---|
KerasLRN(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasLRN(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasPoolHelper(Map<String,Object> layerConfig)
Constructor from parsed Keras layer configuration dictionary.
|
KerasPoolHelper(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Constructor from parsed Keras layer configuration dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
ComputationGraph |
TrainedModelHelper.loadModel()
Deprecated.
|
Copyright © 2017. All rights reserved.