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, modelBuilderpublic 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 exceptionInvalidKerasConfigurationExceptionUnsupportedKerasConfigurationExceptionpublic KerasSequentialModel()
public MultiLayerConfiguration getMultiLayerConfiguration() throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
InvalidKerasConfigurationExceptionUnsupportedKerasConfigurationExceptionpublic MultiLayerNetwork getMultiLayerNetwork() throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
InvalidKerasConfigurationExceptionUnsupportedKerasConfigurationExceptionpublic MultiLayerNetwork getMultiLayerNetwork(boolean importWeights) throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException
InvalidKerasConfigurationExceptionUnsupportedKerasConfigurationExceptionCopyright © 2021. All rights reserved.