pub struct BCECriterion { /* private fields */ }
Expand description

The binary cross entropy criterion.

Uses the Sigmoid activation function and the cross entropy error.

Implementations

Constructs a new BCECriterion with the given regularization.

Examples
use rusty_machine::learning::nnet::BCECriterion;
use rusty_machine::learning::toolkit::regularization::Regularization;

// Create a new BCE criterion with L2 regularization of 0.3.
let criterion = BCECriterion::new(Regularization::L2(0.3f64));

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
The cost function for the criterion.
Returns the regularization for this criterion. Read more
The cost function. Read more
The gradient of the cost function. Read more
Checks if the current criterion includes regularization. Read more
Returns the regularization cost for the criterion. Read more
Returns the regularization gradient for the criterion. Read more
Formats the value using the given formatter. Read more

Creates an MSE Criterion without any regularization.

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.