pub trait CostFunc<T> {
    fn cost(outputs: &T, targets: &T) -> f64;
    fn grad_cost(outputs: &T, targets: &T) -> T;
}
Expand description

Trait for cost functions in models.

Required Methods

The cost function.

The gradient of the cost function.

Implementors