![]() |
MyCaffe
1.11.8.27
Deep learning software for Windows C# programmers.
|
The SolverParameter is a parameter for the solver, specifying the train and test networks. More...
Public Types | |
enum | EvaluationType { CLASSIFICATION , DETECTION } |
Defines the evaluation method used in the SSD algorithm. More... | |
enum | SnapshotFormat { BINARYPROTO = 1 } |
Defines the format of each snapshot. More... | |
enum | SolverType { SGD = 0 , NESTEROV = 1 , ADAGRAD = 2 , RMSPROP = 3 , ADADELTA = 4 , ADAM = 5 , LBFGS = 6 , ADAMW = 7 , _MAX = 8 } |
Defines the type of solver. More... | |
enum | LearningRatePolicyType { FIXED , STEP , EXP , INV , MULTISTEP , POLY , SIGMOID } |
Defines the learning rate policy to use. More... | |
enum | RegularizationType { NONE , L1 , L2 } |
Defines the regularization type. When enabled, weight_decay is used. More... | |
Public Member Functions | |
SolverParameter () | |
The SolverParameter constructor. More... | |
SolverParameter | Clone () |
Creates a new copy of the SolverParameter. More... | |
override RawProto | ToProto (string strName) |
Converts the SolverParameter into a RawProto. More... | |
string | DebugString () |
Returns a debug string for the SolverParameter. More... | |
![]() | |
BaseParameter () | |
Constructor for the parameter. More... | |
virtual bool | Compare (BaseParameter p) |
Compare this parameter to another parameter. More... | |
Static Public Member Functions | |
static SolverParameter | FromProto (RawProto rp) |
Parses a new SolverParameter from a RawProto. More... | |
![]() | |
static double | ParseDouble (string strVal) |
Parse double values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More... | |
static bool | TryParse (string strVal, out double df) |
Parse double values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More... | |
static float | ParseFloat (string strVal) |
Parse float values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More... | |
static bool | TryParse (string strVal, out float f) |
Parse doufloatble values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More... | |
Properties | |
bool | output_average_results [getset] |
Specifies to average loss results before they are output - this can be faster when there are a lot of results in a cycle. More... | |
string | custom_trainer [getset] |
Specifies the Name of the custom trainer (if any) - this is an optional setting used by exteral software to provide a customized training process. Each custom trainer must implement the IDnnCustomTraininer interface which contains a 'Name'property - the named returned from this property is the value set here as the 'custom_trainer'. More... | |
string | custom_trainer_properties [getset] |
Specifies the custom trainer properties (if any) - this is an optional setting used by exteral software to provide the propreties for a customized training process. More... | |
NetParameter | net_param [getset] |
Inline train net param, possibly combined with one or more test nets. More... | |
NetParameter | train_net_param [getset] |
Inline train net param, possibly combined with one or more test nets. More... | |
List< NetParameter > | test_net_param [getset] |
Inline test net params. More... | |
NetState | train_state [getset] |
The states for the train/test nets. Must be unspecified or specified once per net. More... | |
List< NetState > | test_state [getset] |
The states for the train/test nets. Must be unspecified or specified once per net. More... | |
List< int > | test_iter [getset] |
The number of iterations for each test. More... | |
int | test_interval [getset] |
The number of iterations between two testing phases. More... | |
bool | test_compute_loss [getset] |
Test the compute loss. More... | |
bool | test_initialization [getset] |
If true, run an initial test pass before the first iteration, ensuring memory availability and printing the starting value of the loss. More... | |
double | base_lr [getset] |
The base learning rate. More... | |
int | display [getset] |
The number of iterations between displaying info. If display = 0, no info will be displayed. More... | |
int | average_loss [getset] |
Display the loss averaged over the last average_loss iterations. More... | |
int | max_iter [getset] |
The maximum number of iterations. More... | |
int | iter_size [getset] |
Accumulate gradients over 'iter_size' x 'batch_size' instances. More... | |
LearningRatePolicyType | LearningRatePolicy [getset] |
The learning rate decay policy. More... | |
string | lr_policy [getset] |
The learning rate decay policy. More... | |
double | gamma [getset] |
The 'gamma' parameter to compute the learning rate. More... | |
double | power [getset] |
The 'power' parameter to compute the learning rate. More... | |
double | momentum [getset] |
Specifies the momentum value - used by all solvers EXCEPT the 'AdaGrad' and 'RMSProp' solvers. For these latter solvers, momentum should = 0. More... | |
double | weight_decay [getset] |
The weight decay. More... | |
RegularizationType | Regularization [getset] |
The regularization type. More... | |
string | regularization_type [getset] |
The regularization type. More... | |
int | stepsize [getset] |
The stepsize for learning rate policy 'step'. More... | |
List< int > | stepvalue [getset] |
The step values for learning rate policy 'multistep'. More... | |
double | clip_gradients [getset] |
Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm, whenever their actual L2 norm is larger. More... | |
bool | enable_clip_gradient_status [getset] |
Optionally, enable status output when gradients are clipped (default = true) More... | |
int | snapshot [getset] |
Specifies the snapshot interval. More... | |
string | snapshot_prefix [getset] |
The prefix for the snapshot. More... | |
bool | snapshot_diff [getset] |
Whether to snapshot diff in the results or not. Snapshotting diff will help debugging but the final protocol buffer size will be much larger. More... | |
SnapshotFormat | snapshot_format [getset] |
The snapshot format. More... | |
bool | snapshot_include_weights [getset] |
Specifies whether or not the snapshot includes the trained weights. The default = true. More... | |
bool | snapshot_include_state [getset] |
Specifies whether or not the snapshot includes the solver state. The default = false. Including the solver state will slow down the time of each snapshot. More... | |
int | device_id [getset] |
The device id that will be used when run on the GPU. More... | |
long | random_seed [getset] |
If non-negative, the seed with which the Solver will initialize the caffe random number generator – useful for repoducible results. Otherwise (and by default) initialize using a seed derived from the system clock. More... | |
SolverType | type [getset] |
Specifies the solver type. More... | |
double | delta [getset] |
Numerical stability for RMSProp, AdaGrad, AdaDelta, Adam and AdamW solvers. More... | |
double | momentum2 [getset] |
An additional momentum property for the Adam and AdamW solvers. More... | |
double | rms_decay [getset] |
Specifies the 'RMSProp' decay value used by the 'RMSProp' solver. More... | |
double | adamw_decay [getset] |
Specifies the 'AdamW' detached weight decay value used by the 'AdamW' solver. More... | |
bool | debug_info [getset] |
If true, print information about the state of the net that may help with debugging learning problems. More... | |
int | lbgfs_corrections [getset] |
Specifies the number of lbgfs corrections used with the L-BGFS solver. More... | |
bool | snapshot_after_train [getset] |
If false, don't save a snapshot after training finishes. More... | |
EvaluationType | eval_type [getset] |
Specifies the evaluation type to use when using Single-Shot Detection (SSD) - (default = NONE, SSD not used). More... | |
ApVersion | ap_version [getset] |
Specifies the AP Version to use for average precision when using Single-Shot Detection (SSD) - (default = INTEGRAL). More... | |
bool | show_per_class_result [getset] |
Specifies whether or not to display results per class when using Single-Shot Detection (SSD) - (default = false). More... | |
int | accuracy_average_window [getset] |
Specifies the window over which to average the accuracies (default = 0 which ignores averaging). More... | |
The SolverParameter is a parameter for the solver, specifying the train and test networks.
Exactly one train net must be specified using one of the following fields: train_net_param, train_net, net_param, net
One or more of the test nets may be specified using any of the following fields: test_net_param, test_net, net_param, net
If more than one test net field is specified (e.g., both net and test_net are specified), they will be evaluated in the field order given above: (1) test_net_param, (2) test_net, (3) net_param/net
A test_iter must be specified for each test_net. A test_level and/or test_stage may also be specified for each test_net.
Definition at line 29 of file SolverParameter.cs.
Defines the evaluation method used in the SSD algorithm.
Enumerator | |
---|---|
CLASSIFICATION | Specifies to run a standard classification evaluation. |
DETECTION | Specifies detection evaluation used in the SSD algorithm. |
Definition at line 84 of file SolverParameter.cs.
Defines the learning rate policy to use.
Definition at line 179 of file SolverParameter.cs.
Defines the regularization type. When enabled, weight_decay is used.
Enumerator | |
---|---|
NONE | Specifies to not use regularization. |
L1 | Specifies L1 regularization. |
L2 | Specifies L2 regularization. |
Definition at line 214 of file SolverParameter.cs.
Defines the format of each snapshot.
Enumerator | |
---|---|
BINARYPROTO | Save snapshots in the binary prototype format. |
Definition at line 99 of file SolverParameter.cs.
Defines the type of solver.
Enumerator | |
---|---|
SGD | Use Stochastic Gradient Descent solver with momentum updates weights by a linear combination of the negative gradient and the previous weight update.
|
NESTEROV | Use Nesterov's accelerated gradient, similar to SGD, but error gradient is computed on the weights with added momentum.
|
ADAGRAD | Use Gradient based optimization like SGD that tries to find rarely seen features
|
RMSPROP | Use RMS Prop gradient based optimization like SGD.
|
ADADELTA | Use AdaDelta gradient based optimization like SGD. See ADADELTA: An Adaptive Learning Rate Method by Zeiler, Matthew D., 2012. |
ADAM | Use Adam gradient based optimization like SGD that includes 'adaptive momentum estimation' and can be thougth of as a generalization of AdaGrad.
|
LBFGS | Use the L-BFGS solver based on the implementation of minFunc by Marc Schmidt.
|
ADAMW | Use AdamW gradient based optimization like Adam that includes a detached weight decay.
|
Definition at line 110 of file SolverParameter.cs.
MyCaffe.param.SolverParameter.SolverParameter | ( | ) |
The SolverParameter constructor.
Definition at line 233 of file SolverParameter.cs.
SolverParameter MyCaffe.param.SolverParameter.Clone | ( | ) |
Creates a new copy of the SolverParameter.
Definition at line 242 of file SolverParameter.cs.
string MyCaffe.param.SolverParameter.DebugString | ( | ) |
Returns a debug string for the SolverParameter.
Definition at line 1340 of file SolverParameter.cs.
|
static |
Parses a new SolverParameter from a RawProto.
rp | Specifies the RawProto representing the SolverParameter. |
Definition at line 1090 of file SolverParameter.cs.
|
virtual |
Converts the SolverParameter into a RawProto.
strName | Specifies a name given to the RawProto. |
Implements MyCaffe.basecode.BaseParameter.
Definition at line 963 of file SolverParameter.cs.
|
getset |
Specifies the window over which to average the accuracies (default = 0 which ignores averaging).
Definition at line 952 of file SolverParameter.cs.
|
getset |
Specifies the 'AdamW' detached weight decay value used by the 'AdamW' solver.
Decay applied to detached weight decay.
Definition at line 875 of file SolverParameter.cs.
|
getset |
Specifies the AP Version to use for average precision when using Single-Shot Detection (SSD) - (default = INTEGRAL).
Definition at line 931 of file SolverParameter.cs.
|
getset |
Display the loss averaged over the last average_loss iterations.
Definition at line 421 of file SolverParameter.cs.
|
getset |
The base learning rate.
Definition at line 399 of file SolverParameter.cs.
|
getset |
Set clip_gradients to >= 0 to clip parameter gradients to that L2 norm, whenever their actual L2 norm is larger.
Definition at line 704 of file SolverParameter.cs.
|
getset |
Specifies the Name of the custom trainer (if any) - this is an optional setting used by exteral software to provide a customized training process. Each custom trainer must implement the IDnnCustomTraininer interface which contains a 'Name'property - the named returned from this property is the value set here as the 'custom_trainer'.
Definition at line 266 of file SolverParameter.cs.
|
getset |
Specifies the custom trainer properties (if any) - this is an optional setting used by exteral software to provide the propreties for a customized training process.
Note all spaces are replaced with '~' characters to avoid parsing errors.
Definition at line 281 of file SolverParameter.cs.
|
getset |
If true, print information about the state of the net that may help with debugging learning problems.
Definition at line 887 of file SolverParameter.cs.
|
getset |
Numerical stability for RMSProp, AdaGrad, AdaDelta, Adam and AdamW solvers.
Definition at line 836 of file SolverParameter.cs.
|
getset |
The device id that will be used when run on the GPU.
Definition at line 795 of file SolverParameter.cs.
|
getset |
The number of iterations between displaying info. If display = 0, no info will be displayed.
Definition at line 411 of file SolverParameter.cs.
|
getset |
Optionally, enable status output when gradients are clipped (default = true)
Definition at line 714 of file SolverParameter.cs.
|
getset |
Specifies the evaluation type to use when using Single-Shot Detection (SSD) - (default = NONE, SSD not used).
Definition at line 920 of file SolverParameter.cs.
|
getset |
The 'gamma' parameter to compute the learning rate.
Definition at line 573 of file SolverParameter.cs.
|
getset |
Accumulate gradients over 'iter_size' x 'batch_size' instances.
Definition at line 443 of file SolverParameter.cs.
|
getset |
Specifies the number of lbgfs corrections used with the L-BGFS solver.
Definition at line 898 of file SolverParameter.cs.
|
getset |
The learning rate decay policy.
The currently implemented learning rate policies are as follows:
where base_lr, max_iter, gamma, step, stepvalue and power are defined int the solver protocol buffer, and iter is the current iteration.
Definition at line 472 of file SolverParameter.cs.
|
getset |
The learning rate decay policy.
The currently implemented learning rate policies are as follows:
where base_lr, max_iter, gamma, step, stepvalue and power are defined int the solver protocol buffer, and iter is the current iteration.
Definition at line 562 of file SolverParameter.cs.
|
getset |
The maximum number of iterations.
Definition at line 432 of file SolverParameter.cs.
|
getset |
Specifies the momentum value - used by all solvers EXCEPT the 'AdaGrad' and 'RMSProp' solvers. For these latter solvers, momentum should = 0.
Definition at line 596 of file SolverParameter.cs.
|
getset |
An additional momentum property for the Adam and AdamW solvers.
Definition at line 847 of file SolverParameter.cs.
|
getset |
Inline train net param, possibly combined with one or more test nets.
Definition at line 291 of file SolverParameter.cs.
|
getset |
Specifies to average loss results before they are output - this can be faster when there are a lot of results in a cycle.
Definition at line 253 of file SolverParameter.cs.
|
getset |
The 'power' parameter to compute the learning rate.
Definition at line 584 of file SolverParameter.cs.
|
getset |
If non-negative, the seed with which the Solver will initialize the caffe random number generator – useful for repoducible results. Otherwise (and by default) initialize using a seed derived from the system clock.
Definition at line 807 of file SolverParameter.cs.
|
getset |
The regularization type.
The regularization types supported are:
Definition at line 621 of file SolverParameter.cs.
|
getset |
The regularization type.
The regularization types supported are:
Definition at line 671 of file SolverParameter.cs.
|
getset |
Specifies the 'RMSProp' decay value used by the 'RMSProp' solver.
MeanSquare(t) = rms_decay * MeanSquare(t-1) + (1 - rms_decay) * SquareGradient(t)
Definition at line 861 of file SolverParameter.cs.
|
getset |
Specifies whether or not to display results per class when using Single-Shot Detection (SSD) - (default = false).
Definition at line 942 of file SolverParameter.cs.
|
getset |
Specifies the snapshot interval.
Definition at line 725 of file SolverParameter.cs.
|
getset |
If false, don't save a snapshot after training finishes.
Definition at line 909 of file SolverParameter.cs.
|
getset |
Whether to snapshot diff in the results or not. Snapshotting diff will help debugging but the final protocol buffer size will be much larger.
Definition at line 748 of file SolverParameter.cs.
|
getset |
The snapshot format.
Currently only the Binary Proto Buffer format is supported.
Definition at line 762 of file SolverParameter.cs.
|
getset |
Specifies whether or not the snapshot includes the solver state. The default = false. Including the solver state will slow down the time of each snapshot.
Definition at line 784 of file SolverParameter.cs.
|
getset |
Specifies whether or not the snapshot includes the trained weights. The default = true.
Definition at line 773 of file SolverParameter.cs.
|
getset |
The prefix for the snapshot.
Definition at line 736 of file SolverParameter.cs.
|
getset |
The stepsize for learning rate policy 'step'.
Definition at line 682 of file SolverParameter.cs.
|
getset |
The step values for learning rate policy 'multistep'.
Definition at line 693 of file SolverParameter.cs.
|
getset |
Test the compute loss.
Definition at line 377 of file SolverParameter.cs.
|
getset |
If true, run an initial test pass before the first iteration, ensuring memory availability and printing the starting value of the loss.
Definition at line 389 of file SolverParameter.cs.
|
getset |
The number of iterations between two testing phases.
Definition at line 367 of file SolverParameter.cs.
|
getset |
The number of iterations for each test.
Definition at line 356 of file SolverParameter.cs.
|
getset |
Inline test net params.
Definition at line 311 of file SolverParameter.cs.
|
getset |
The states for the train/test nets. Must be unspecified or specified once per net.
By default, all states will have solver = true; train_state will have phase = TRAIN, and all test_state's will have phase = TESET. Other defaults are set according to NetState defaults.
Definition at line 345 of file SolverParameter.cs.
|
getset |
Inline train net param, possibly combined with one or more test nets.
Definition at line 301 of file SolverParameter.cs.
|
getset |
The states for the train/test nets. Must be unspecified or specified once per net.
By default, all states will have solver = true; train_state will have phase = TRAIN, and all test_state's will have phase = TESET. Other defaults are set according to NetState defaults.
Definition at line 328 of file SolverParameter.cs.
|
getset |
Specifies the solver type.
Definition at line 825 of file SolverParameter.cs.
|
getset |
The weight decay.
Definition at line 606 of file SolverParameter.cs.