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§

Provided Methods§

source

fn get_train_method(&self) -> Result<i32>

Returns current training method

source

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

source

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

source

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

source

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

source

fn get_rprop_dw0(&self) -> Result<f64>

RPROP: Initial value inline formula of update-values inline formula. Default value is 0.1.

§See also

setRpropDW0

source

fn get_rprop_dw_plus(&self) -> Result<f64>

RPROP: Increase factor inline formula. It must be >1. Default value is 1.2.

§See also

setRpropDWPlus

source

fn get_rprop_dw_minus(&self) -> Result<f64>

RPROP: Decrease factor inline formula. It must be <1. Default value is 0.5.

§See also

setRpropDWMinus

source

fn get_rprop_dw_min(&self) -> Result<f64>

RPROP: Update-values lower limit inline formula. It must be positive. Default value is FLT_EPSILON.

§See also

setRpropDWMin

source

fn get_rprop_dw_max(&self) -> Result<f64>

RPROP: Update-values upper limit inline formula. It must be >1. Default value is 50.

§See also

setRpropDWMax

source

fn get_anneal_initial_t(&self) -> Result<f64>

ANNEAL: Update initial temperature. It must be >=0. Default value is 10.

§See also

setAnnealInitialT

source

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

source

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

source

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

source

fn get_weights(&self, layer_idx: i32) -> Result<Mat>

Object Safety§

This trait is not object safe.

Implementors§