| Modifier and Type | Method and Description |
|---|---|
static void |
KerasLayer.checkForUnsupportedConfigurations(Map<String,Object> layerConfig,
boolean enforceTrainingConfig)
Checks whether layer config contains unsupported options.
|
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.
|
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.
|
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.
|
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.
|
InputType |
KerasLayer.getOutputType(InputType... inputType)
Get layer output type.
|
int[] |
KerasLayer.getPaddingFromBorderModeConfig(Map<String,Object> layerConfig)
Get (convolution) padding from Keras layer configuration.
|
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 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.
|
static org.nd4j.linalg.activations.IActivation |
KerasLayer.mapActivation(String kerasActivation)
Map Keras to DL4J activation functions.
|
static org.nd4j.linalg.lossfunctions.LossFunctions.LossFunction |
KerasLayer.mapLossFunction(String kerasLoss)
Map Keras to DL4J loss functions.
|
static int[] |
KerasLayer.mapPoolingDimensions(String className)
Map Keras pooling layers to DL4J pooling dimensions.
|
static PoolingType |
KerasLayer.mapPoolingType(String className)
Map Keras pooling layers to DL4J pooling types.
|
static WeightInit |
KerasLayer.mapWeightInitialization(String kerasInit)
Map Keras to DL4J weight initialization functions.
|
String |
Hdf5Archive.readAttributeAsJson(String attributeName,
String... groups)
Read JSON-formatted string attribute from group path.
|
String |
Hdf5Archive.readAttributeAsString(String attributeName,
String... groups)
Read string attribute from group path.
|
org.nd4j.linalg.api.ndarray.INDArray |
Hdf5Archive.readDataSet(String datasetName,
String... groups)
Read data set as ND4J array from group path.
|
| 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.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.
|
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.
|
ElementWiseVertex.Op |
KerasMerge.getMergeMode(Map<String,Object> layerConfig) |
InputType |
KerasInput.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.
|
| 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.
|
KerasInput(String layerName,
int[] inputShape)
Constructor from layer name and input shape.
|
KerasInput(String layerName,
int[] inputShape,
boolean enforceTrainingConfig)
Constructor from layer name and input shape.
|
KerasLoss(String layerName,
String inboundLayerName,
String kerasLoss)
Constructor from layer name and input shape.
|
KerasLoss(String layerName,
String inboundLayerName,
String kerasLoss,
boolean enforceTrainingConfig)
Constructor from layer name and input shape.
|
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.
|
| 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.