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.
pub trait CostFunc<T> {
fn cost(outputs: &T, targets: &T) -> f64;
fn grad_cost(outputs: &T, targets: &T) -> T;
}
Trait for cost functions in models.