public class KerasSequentialModel extends KerasModel
className, config, dimOrder, enforceTrainingConfig, inputLayerNames, kerasBackend, kerasMajorVersion, layers, layersOrdered, modelBuilder, optimizer, outputLayerNames, outputTypes, truncatedBPTT, useTruncatedBPTT
Constructor and Description |
---|
KerasSequentialModel()
Default constructor
|
KerasSequentialModel(KerasModelBuilder modelBuilder)
(Recommended) Builder-pattern constructor for Sequential model.
|
KerasSequentialModel(String modelJson,
String modelYaml,
Hdf5Archive weightsArchive,
String weightsRoot,
String trainingJson,
Hdf5Archive trainingArchive,
boolean enforceTrainingConfig,
int[] inputShape)
(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 |
---|---|
MultiLayerConfiguration |
getMultiLayerConfiguration()
Configure a MultiLayerConfiguration from this Keras Sequential model configuration.
|
MultiLayerNetwork |
getMultiLayerNetwork()
Build a MultiLayerNetwork from this Keras Sequential model configuration.
|
MultiLayerNetwork |
getMultiLayerNetwork(boolean importWeights)
Build a MultiLayerNetwork from this Keras Sequential model configuration and import weights.
|
getComputationGraph, getComputationGraph, getComputationGraphConfiguration, modelBuilder
public KerasSequentialModel(KerasModelBuilder modelBuilder) throws UnsupportedKerasConfigurationException, IOException, InvalidKerasConfigurationException
modelBuilder
- builder objectIOException
- I/O exceptionInvalidKerasConfigurationException
- Invalid Keras configurationUnsupportedKerasConfigurationException
- Unsupported Keras configurationpublic KerasSequentialModel(String modelJson, String modelYaml, Hdf5Archive weightsArchive, String weightsRoot, String trainingJson, Hdf5Archive trainingArchive, boolean enforceTrainingConfig, int[] inputShape) throws IOException, InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
modelJson
- model configuration JSON stringmodelYaml
- model configuration YAML stringtrainingJson
- training configuration JSON stringIOException
- I/O exceptionInvalidKerasConfigurationException
UnsupportedKerasConfigurationException
public KerasSequentialModel()
public MultiLayerConfiguration getMultiLayerConfiguration() throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
InvalidKerasConfigurationException
UnsupportedKerasConfigurationException
public MultiLayerNetwork getMultiLayerNetwork() throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
InvalidKerasConfigurationException
UnsupportedKerasConfigurationException
public MultiLayerNetwork getMultiLayerNetwork(boolean importWeights) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
InvalidKerasConfigurationException
UnsupportedKerasConfigurationException
Copyright © 2022. All rights reserved.