Trait opencv::prelude::ANN_MLPTraitConst
source · pub trait ANN_MLPTraitConst: StatModelTraitConst {
Show 16 methods
// Required method
fn as_raw_ANN_MLP(&self) -> *const c_void;
// Provided methods
fn get_train_method(&self) -> Result<i32> { ... }
fn get_layer_sizes(&self) -> Result<Mat> { ... }
fn get_term_criteria(&self) -> Result<TermCriteria> { ... }
fn get_backprop_weight_scale(&self) -> Result<f64> { ... }
fn get_backprop_momentum_scale(&self) -> Result<f64> { ... }
fn get_rprop_dw0(&self) -> Result<f64> { ... }
fn get_rprop_dw_plus(&self) -> Result<f64> { ... }
fn get_rprop_dw_minus(&self) -> Result<f64> { ... }
fn get_rprop_dw_min(&self) -> Result<f64> { ... }
fn get_rprop_dw_max(&self) -> Result<f64> { ... }
fn get_anneal_initial_t(&self) -> Result<f64> { ... }
fn get_anneal_final_t(&self) -> Result<f64> { ... }
fn get_anneal_cooling_ratio(&self) -> Result<f64> { ... }
fn get_anneal_ite_per_step(&self) -> Result<i32> { ... }
fn get_weights(&self, layer_idx: i32) -> Result<Mat> { ... }
}
Expand description
Constant methods for crate::ml::ANN_MLP
Required Methods§
fn as_raw_ANN_MLP(&self) -> *const c_void
Provided Methods§
sourcefn get_train_method(&self) -> Result<i32>
fn get_train_method(&self) -> Result<i32>
Returns current training method
sourcefn get_layer_sizes(&self) -> Result<Mat>
fn get_layer_sizes(&self) -> Result<Mat>
Integer vector specifying the number of neurons in each layer including the input and output layers. The very first element specifies the number of elements in the input layer. The last element - number of elements in the output layer.
§See also
setLayerSizes
sourcefn get_term_criteria(&self) -> Result<TermCriteria>
fn get_term_criteria(&self) -> Result<TermCriteria>
Termination criteria of the training algorithm. You can specify the maximum number of iterations (maxCount) and/or how much the error could change between the iterations to make the algorithm continue (epsilon). Default value is TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 1000, 0.01).
§See also
setTermCriteria
sourcefn get_backprop_weight_scale(&self) -> Result<f64>
fn get_backprop_weight_scale(&self) -> Result<f64>
BPROP: Strength of the weight gradient term. The recommended value is about 0.1. Default value is 0.1.
§See also
setBackpropWeightScale
sourcefn get_backprop_momentum_scale(&self) -> Result<f64>
fn get_backprop_momentum_scale(&self) -> Result<f64>
BPROP: Strength of the momentum term (the difference between weights on the 2 previous iterations). This parameter provides some inertia to smooth the random fluctuations of the weights. It can vary from 0 (the feature is disabled) to 1 and beyond. The value 0.1 or so is good enough. Default value is 0.1.
§See also
setBackpropMomentumScale
sourcefn get_rprop_dw0(&self) -> Result<f64>
fn get_rprop_dw0(&self) -> Result<f64>
sourcefn get_rprop_dw_plus(&self) -> Result<f64>
fn get_rprop_dw_plus(&self) -> Result<f64>
sourcefn get_rprop_dw_minus(&self) -> Result<f64>
fn get_rprop_dw_minus(&self) -> Result<f64>
sourcefn get_rprop_dw_min(&self) -> Result<f64>
fn get_rprop_dw_min(&self) -> Result<f64>
RPROP: Update-values lower limit .
It must be positive. Default value is FLT_EPSILON.
§See also
setRpropDWMin
sourcefn get_rprop_dw_max(&self) -> Result<f64>
fn get_rprop_dw_max(&self) -> Result<f64>
sourcefn get_anneal_initial_t(&self) -> Result<f64>
fn get_anneal_initial_t(&self) -> Result<f64>
ANNEAL: Update initial temperature. It must be >=0. Default value is 10.
§See also
setAnnealInitialT
sourcefn get_anneal_final_t(&self) -> Result<f64>
fn get_anneal_final_t(&self) -> Result<f64>
ANNEAL: Update final temperature. It must be >=0 and less than initialT. Default value is 0.1.
§See also
setAnnealFinalT
sourcefn get_anneal_cooling_ratio(&self) -> Result<f64>
fn get_anneal_cooling_ratio(&self) -> Result<f64>
ANNEAL: Update cooling ratio. It must be >0 and less than 1. Default value is 0.95.
§See also
setAnnealCoolingRatio
sourcefn get_anneal_ite_per_step(&self) -> Result<i32>
fn get_anneal_ite_per_step(&self) -> Result<i32>
ANNEAL: Update iteration per step. It must be >0 . Default value is 10.
§See also
setAnnealItePerStep