public class NeuralNetConfiguration extends Object implements Serializable, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
NeuralNetConfiguration.Builder
NeuralNetConfiguration builder, used as a starting point for creating a MultiLayerConfiguration or
ComputationGraphConfiguration.
Note that values set here on the layer will be applied to all relevant layers - unless the value is overridden on a layer's configuration |
static class |
NeuralNetConfiguration.ListBuilder
Fluent interface for building a list of configurations
|
Modifier and Type | Field and Description |
---|---|
protected CacheMode |
cacheMode |
protected int |
epochCount |
protected int |
iterationCount |
protected Map<String,Double> |
l1ByParam |
protected Map<String,Double> |
l2ByParam |
protected Layer |
layer |
protected int |
maxNumLineSearchIterations |
protected boolean |
miniBatch |
protected boolean |
minimize |
protected OptimizationAlgorithm |
optimizationAlgo |
protected boolean |
pretrain |
protected long |
seed |
protected StepFunction |
stepFunction |
protected List<String> |
variables |
Constructor and Description |
---|
NeuralNetConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
addVariable(String variable) |
void |
clearVariables() |
NeuralNetConfiguration |
clone()
Creates and returns a deep copy of the configuration.
|
static NeuralNetConfiguration |
fromJson(String json)
Create a neural net configuration from json
|
static NeuralNetConfiguration |
fromYaml(String json)
Create a neural net configuration from json
|
double |
getL1ByParam(String variable) |
double |
getL2ByParam(String variable) |
static org.nd4j.shade.jackson.databind.ObjectMapper |
mapper()
Object mapper for serialization of configurations
|
static org.nd4j.shade.jackson.databind.ObjectMapper |
mapperYaml()
Object mapper for serialization of configurations
|
static void |
registerLegacyCustomClassesForJSON(Class<?>... classes)
Register a set of classes (Layer, GraphVertex, InputPreProcessor, IActivation, ILossFunction, ReconstructionDistribution
ONLY) for JSON deserialization.
This is required ONLY when BOTH of the following conditions are met: 1. |
static void |
registerLegacyCustomClassesForJSON(List<org.nd4j.linalg.primitives.Pair<String,Class>> classes)
Register a set of classes (Layer, GraphVertex, InputPreProcessor, IActivation, ILossFunction, ReconstructionDistribution
ONLY) for JSON deserialization, with custom names.
Using this method directly should never be required (instead: use registerLegacyCustomClassesForJSON(Class[])
but is added in case it is required in non-standard circumstances. |
static void |
registerLegacyCustomClassesForJSONList(List<Class<?>> classes) |
void |
resetVariables() |
void |
setLayerParamLR(String variable) |
String |
toJson()
Return this configuration as json
|
String |
toYaml()
Return this configuration as json
|
List<String> |
variables() |
List<String> |
variables(boolean copy) |
protected Layer layer
protected boolean miniBatch
protected int maxNumLineSearchIterations
protected long seed
protected OptimizationAlgorithm optimizationAlgo
protected StepFunction stepFunction
protected boolean minimize
protected boolean pretrain
protected CacheMode cacheMode
protected int iterationCount
protected int epochCount
public NeuralNetConfiguration clone()
public void addVariable(String variable)
public void clearVariables()
public void resetVariables()
public void setLayerParamLR(String variable)
public double getL1ByParam(String variable)
public double getL2ByParam(String variable)
public String toYaml()
public static NeuralNetConfiguration fromYaml(String json)
json
- the neural net configuration from jsonpublic String toJson()
public static NeuralNetConfiguration fromJson(String json)
json
- the neural net configuration from jsonpublic static org.nd4j.shade.jackson.databind.ObjectMapper mapperYaml()
public static org.nd4j.shade.jackson.databind.ObjectMapper mapper()
public static void registerLegacyCustomClassesForJSON(Class<?>... classes)
classes
- Classes to registerpublic static void registerLegacyCustomClassesForJSONList(List<Class<?>> classes)
public static void registerLegacyCustomClassesForJSON(List<org.nd4j.linalg.primitives.Pair<String,Class>> classes)
registerLegacyCustomClassesForJSON(Class[])
but is added in case it is required in non-standard circumstances.Copyright © 2018. All rights reserved.