public class ComputationGraphConfiguration extends Object implements Serializable, Cloneable
MultiLayerConfiguration
, but allows considerably greater flexibility for the network
architecture.GraphVertex
,
which may for example be a layer or a vertex/object that defines arbitrary forward and backward pass functionality.OutputLayer
instances.
Typical usage:ComputationGraphConfiguration conf = new NeuralNetConfiguration.Builder()....graphBuilder()...build();
Modifier and Type | Class and Description |
---|---|
static class |
ComputationGraphConfiguration.GraphBuilder |
Modifier and Type | Field and Description |
---|---|
protected boolean |
backprop |
protected BackpropType |
backpropType |
protected CacheMode |
cacheMode |
protected NeuralNetConfiguration |
defaultConfiguration |
protected WorkspaceMode |
inferenceWorkspaceMode |
protected int |
iterationCount |
protected List<String> |
networkInputs
List of inputs to the network, by name
|
protected List<String> |
networkOutputs
List of network outputs, by name
|
protected boolean |
pretrain |
protected int |
tbpttBackLength |
protected int |
tbpttFwdLength |
protected WorkspaceMode |
trainingWorkspaceMode |
protected Map<String,List<String>> |
vertexInputs |
protected Map<String,GraphVertex> |
vertices |
Constructor and Description |
---|
ComputationGraphConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
addPreProcessors(InputType... inputTypes)
Add preprocessors automatically, given the specified types of inputs for the network.
|
ComputationGraphConfiguration |
clone() |
static ComputationGraphConfiguration |
fromJson(String json)
Create a computation graph configuration from json
|
static ComputationGraphConfiguration |
fromYaml(String json)
Create a neural net configuration from json
|
NetworkMemoryReport |
getMemoryReport(InputType... inputTypes)
Get a
MemoryReport for the given computation graph configuration. |
String |
toJson() |
String |
toString() |
String |
toYaml() |
void |
validate()
Check the configuration, make sure it is valid
|
protected Map<String,GraphVertex> vertices
protected WorkspaceMode trainingWorkspaceMode
protected WorkspaceMode inferenceWorkspaceMode
protected CacheMode cacheMode
protected boolean pretrain
protected boolean backprop
protected BackpropType backpropType
protected int tbpttFwdLength
protected int tbpttBackLength
protected NeuralNetConfiguration defaultConfiguration
protected int iterationCount
public String toYaml()
public static ComputationGraphConfiguration fromYaml(String json)
json
- the neural net configuration from jsonComputationGraphConfiguration
public String toJson()
public static ComputationGraphConfiguration fromJson(String json)
json
- the neural net configuration from jsonComputationGraphConfiguration
public ComputationGraphConfiguration clone()
public void validate()
IllegalStateException
- if configuration is not validpublic void addPreProcessors(InputType... inputTypes)
InputType
class, in the same order in which the inputs were defined in the original configuration..addPreProcessors(InputType.convolutional(1,28,28),InputType.feedForward())
.ComputationGraphConfiguration.GraphBuilder.setInputTypes(InputType...)
functionality.
See that method for details.public NetworkMemoryReport getMemoryReport(InputType... inputTypes)
MemoryReport
for the given computation graph configuration. This is used to estimate the
memory requirements for the given network configuration and inputinputTypes
- Input types for the networkCopyright © 2017. All rights reserved.