public class NeuralNetConfiguration
extends java.lang.Object
implements java.io.Serializable, weka.core.OptionHandler
The duplicate code of configuration parameters is necessary since the dl4j NeuralNetConfiguration.Builder object is not serializable which is necessary for the weka GUI.
Constructor and Description |
---|
NeuralNetConfiguration()
Constructor that provides default values for the settings.
|
Modifier and Type | Method and Description |
---|---|
org.deeplearning4j.nn.conf.NeuralNetConfiguration.Builder |
builder()
Deliver access to the internal builder
|
double |
getBiasInit() |
Updater |
getBiasUpdater() |
Distribution<? extends org.deeplearning4j.nn.conf.distribution.Distribution> |
getDist() |
AbstractDropout |
getDropout() |
GradientNormalization |
getGradientNormalization() |
double |
getGradientNormalizationThreshold() |
double |
getL1() |
double |
getL2() |
org.deeplearning4j.nn.api.OptimizationAlgorithm |
getOptimizationAlgo() |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
long |
getSeed() |
Updater |
getUpdater() |
org.deeplearning4j.nn.weights.WeightInit |
getWeightInit() |
AbstractWeightNoise |
getWeightNoise() |
java.lang.String |
globalInfo()
Returns a string describing this search method
|
boolean |
isMiniBatch() |
boolean |
isMinimize() |
java.util.Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options.
|
void |
setBiasInit(double biasInit) |
void |
setBiasUpdater(Updater biasUpdater) |
void |
setDist(Distribution<? extends org.deeplearning4j.nn.conf.distribution.Distribution> dist) |
void |
setDropout(AbstractDropout dropout) |
void |
setGradientNormalization(GradientNormalization gradientNormalization) |
void |
setGradientNormalizationThreshold(double gradientNormalizationThreshold) |
void |
setL1(double l1) |
void |
setL2(double l2) |
void |
setMiniBatch(boolean b) |
void |
setMinimize(boolean b) |
void |
setOptimizationAlgo(org.deeplearning4j.nn.api.OptimizationAlgorithm optimAlgorithm) |
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setSeed(long n) |
void |
setUpdater(Updater updater) |
void |
setWeightInit(org.deeplearning4j.nn.weights.WeightInit weightInit) |
void |
setWeightNoise(AbstractWeightNoise weightNoise) |
public NeuralNetConfiguration()
public org.deeplearning4j.nn.conf.NeuralNetConfiguration.Builder builder()
@OptionMetadata(description="Optimization algorithm (LINE_GRADIENT_DESCENT, CONJUGATE_GRADIENT, HESSIAN_FREE, LBFGS, STOCHASTIC_GRADIENT_DESCENT)", displayName="optimization algorithm", commandLineParamName="algorithm", commandLineParamSynopsis="-algorithm <string>", displayOrder=1) public org.deeplearning4j.nn.api.OptimizationAlgorithm getOptimizationAlgo()
public void setOptimizationAlgo(org.deeplearning4j.nn.api.OptimizationAlgorithm optimAlgorithm)
@OptionMetadata(displayName="whether to minimize objective", description="Whether to minimize objective.", commandLineParamIsFlag=true, commandLineParamName="minimize", commandLineParamSynopsis="-minimize", displayOrder=7) public boolean isMinimize()
public void setMinimize(boolean b)
@OptionMetadata(displayName="updater", description="The updater to use (default = SGD).", commandLineParamName="updater", commandLineParamSynopsis="-updater <string>", displayOrder=12) public Updater getUpdater()
public void setUpdater(Updater updater)
@OptionMetadata(displayName="biasUpdater", description="The updater to use for the bias (default = SGD).", commandLineParamName="biasUpdater", commandLineParamSynopsis="-biasUpdater <string>", displayOrder=13) public Updater getBiasUpdater()
public void setBiasUpdater(Updater biasUpdater)
@OptionMetadata(displayName="dropout", description="The dropout method to use (default = Dropout(0.0).", commandLineParamName="dropout", commandLineParamSynopsis="-dropout <Dropout>", displayOrder=25) public AbstractDropout getDropout()
public void setDropout(AbstractDropout dropout)
@OptionMetadata(displayName="weightNoise", description="The weight noise method to use (default = None).", commandLineParamName="weightNoise", commandLineParamSynopsis="-weightNoise <WeightNoise>", displayOrder=26) public AbstractWeightNoise getWeightNoise()
public void setWeightNoise(AbstractWeightNoise weightNoise)
@OptionMetadata(displayName="l1 regularization factor", description="L1 regularization factor (default = 0.00).", commandLineParamName="l1", commandLineParamSynopsis="-l1 <double>", displayOrder=14) public double getL1()
public void setL1(double l1)
@OptionMetadata(displayName="l2 regularization factor", description="L2 regularization factor (default = 0.00).", commandLineParamName="l2", commandLineParamSynopsis="-l2 <double>", displayOrder=15) public double getL2()
public void setL2(double l2)
@OptionMetadata(displayName="weight initialization method", description="The method for weight initialization (default = XAVIER).", commandLineParamName="weightInit", commandLineParamSynopsis="-weightInit <specification>", displayOrder=18) public org.deeplearning4j.nn.weights.WeightInit getWeightInit()
public void setWeightInit(org.deeplearning4j.nn.weights.WeightInit weightInit)
@OptionMetadata(displayName="gradient normalization method", description="The gradient normalization method (default = None).", commandLineParamName="gradientNormalization", commandLineParamSynopsis="-gradientNormalization <specification>", displayOrder=22) public GradientNormalization getGradientNormalization()
public void setGradientNormalization(GradientNormalization gradientNormalization)
@OptionMetadata(displayName="gradient normalization threshold", description="The gradient normalization threshold (default = 1).", commandLineParamName="gradNormThreshold", commandLineParamSynopsis="-gradNormThreshold <double>", displayOrder=23) public double getGradientNormalizationThreshold()
public void setGradientNormalizationThreshold(double gradientNormalizationThreshold)
@OptionMetadata(displayName="distribution", description="The weight init distribution type. Only applies when weightinit=DISTRIBUTION (default = Disabled).", commandLineParamName="dist", commandLineParamSynopsis="-dist <specification>", displayOrder=19) public Distribution<? extends org.deeplearning4j.nn.conf.distribution.Distribution> getDist()
public void setDist(Distribution<? extends org.deeplearning4j.nn.conf.distribution.Distribution> dist)
@OptionMetadata(displayName="bias initialization", description="The bias initialization (default = 0.0).", commandLineParamName="biasInit", commandLineParamSynopsis="-biasInit <double>", displayOrder=20) public double getBiasInit()
public void setBiasInit(double biasInit)
@ProgrammaticProperty public long getSeed()
public void setSeed(long n)
@ProgrammaticProperty public boolean isMiniBatch()
public void setMiniBatch(boolean b)
public java.util.Enumeration<weka.core.Option> listOptions()
listOptions
in interface weka.core.OptionHandler
public java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface weka.core.OptionHandler
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String globalInfo()