public static class MultiLayerConfiguration.Builder extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
backprop
Deprecated.
|
protected BackpropType |
backpropType |
protected CacheMode |
cacheMode |
protected List<NeuralNetConfiguration> |
confs |
protected double |
dampingFactor |
protected WorkspaceMode |
inferenceWorkspaceMode |
protected Map<Integer,InputPreProcessor> |
inputPreProcessors |
protected InputType |
inputType |
protected boolean |
legacyBatchScaledL2 |
protected boolean |
pretrain
Deprecated.
|
protected int |
tbpttBackLength |
protected int |
tbpttFwdLength |
protected WorkspaceMode |
trainingWorkspaceMode |
protected boolean |
validateOutputConfig |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
MultiLayerConfiguration.Builder |
backprop(boolean backprop)
Deprecated.
doesn't affect training any more. Use
MultiLayerNetwork.fit(DataSetIterator) when training for backprop. |
MultiLayerConfiguration.Builder |
backpropType(BackpropType type)
The type of backprop.
|
MultiLayerConfiguration |
build() |
MultiLayerConfiguration.Builder |
cacheMode(CacheMode cacheMode)
This method defines how/if preOutput cache is handled:
NONE: cache disabled (default value)
HOST: Host memory will be used
DEVICE: GPU memory will be used (on CPU backends effect will be the same as for HOST)
|
MultiLayerConfiguration.Builder |
confs(List<NeuralNetConfiguration> confs) |
MultiLayerConfiguration.Builder |
inferenceWorkspaceMode(WorkspaceMode workspaceMode)
|
MultiLayerConfiguration.Builder |
inputPreProcessor(Integer layer,
InputPreProcessor processor)
Specify the processors.
|
MultiLayerConfiguration.Builder |
inputPreProcessors(Map<Integer,InputPreProcessor> processors) |
MultiLayerConfiguration.Builder |
legacyBatchScaledL2(boolean legacyBatchScaledL2) |
MultiLayerConfiguration.Builder |
pretrain(boolean pretrain)
Deprecated.
doesn't affect training any more. Use
MultiLayerNetwork.pretrain(DataSetIterator) when training for layerwise pretraining. |
MultiLayerConfiguration.Builder |
setInputType(InputType inputType) |
MultiLayerConfiguration.Builder |
tBPTTBackwardLength(int backwardLength)
When doing truncated BPTT: how many steps of backward should we do?
Only applicable when doing backpropType(BackpropType.TruncatedBPTT) This is the k2 parameter on pg23 of http://www.cs.utoronto.ca/~ilya/pubs/ilya_sutskever_phd_thesis.pdf |
MultiLayerConfiguration.Builder |
tBPTTForwardLength(int forwardLength)
When doing truncated BPTT: how many steps of forward pass should we do
before doing (truncated) backprop?
Only applicable when doing backpropType(BackpropType.TruncatedBPTT) Typically tBPTTForwardLength parameter is same as the tBPTTBackwardLength parameter, but may be larger than it in some circumstances (but never smaller) Ideally your training data time series length should be divisible by this This is the k1 parameter on pg23 of http://www.cs.utoronto.ca/~ilya/pubs/ilya_sutskever_phd_thesis.pdf |
MultiLayerConfiguration.Builder |
tBPTTLength(int bpttLength)
When doing truncated BPTT: how many steps should we do?
Only applicable when doing backpropType(BackpropType.TruncatedBPTT) See: http://www.cs.utoronto.ca/~ilya/pubs/ilya_sutskever_phd_thesis.pdf |
MultiLayerConfiguration.Builder |
trainingWorkspaceMode(WorkspaceMode workspaceMode)
|
MultiLayerConfiguration.Builder |
validateOutputLayerConfig(boolean validate)
Enabled by default.
|
protected List<NeuralNetConfiguration> confs
protected double dampingFactor
protected Map<Integer,InputPreProcessor> inputPreProcessors
@Deprecated protected boolean pretrain
@Deprecated protected boolean backprop
protected BackpropType backpropType
protected int tbpttFwdLength
protected int tbpttBackLength
protected InputType inputType
protected WorkspaceMode trainingWorkspaceMode
protected WorkspaceMode inferenceWorkspaceMode
protected CacheMode cacheMode
protected boolean validateOutputConfig
protected boolean legacyBatchScaledL2
public MultiLayerConfiguration.Builder inputPreProcessor(Integer layer, InputPreProcessor processor)
processor
- what to use to preProcess the data.public MultiLayerConfiguration.Builder inputPreProcessors(Map<Integer,InputPreProcessor> processors)
@Deprecated public MultiLayerConfiguration.Builder backprop(boolean backprop)
MultiLayerNetwork.fit(DataSetIterator)
when training for backprop.backprop
- whether to do back prop or not@Deprecated public MultiLayerConfiguration.Builder trainingWorkspaceMode(@NonNull WorkspaceMode workspaceMode)
@Deprecated public MultiLayerConfiguration.Builder inferenceWorkspaceMode(@NonNull WorkspaceMode workspaceMode)
public MultiLayerConfiguration.Builder cacheMode(@NonNull CacheMode cacheMode)
cacheMode
- public MultiLayerConfiguration.Builder backpropType(@NonNull BackpropType type)
public MultiLayerConfiguration.Builder tBPTTLength(int bpttLength)
bpttLength
- length > 0public MultiLayerConfiguration.Builder tBPTTForwardLength(int forwardLength)
forwardLength
- Forward length > 0, >= backwardLengthpublic MultiLayerConfiguration.Builder tBPTTBackwardLength(int backwardLength)
backwardLength
- <= forwardLength@Deprecated public MultiLayerConfiguration.Builder pretrain(boolean pretrain)
MultiLayerNetwork.pretrain(DataSetIterator)
when training for layerwise pretraining.pretrain
- whether to do pre train or notpublic MultiLayerConfiguration.Builder confs(List<NeuralNetConfiguration> confs)
public MultiLayerConfiguration.Builder setInputType(InputType inputType)
public MultiLayerConfiguration.Builder validateOutputLayerConfig(boolean validate)
validate
- If true: validate output layer configuration. False: don't validatepublic MultiLayerConfiguration.Builder legacyBatchScaledL2(boolean legacyBatchScaledL2)
public MultiLayerConfiguration build()
Copyright © 2018. All rights reserved.