pub trait GradOutput: Tree {
// Required method
fn loss(&self) -> &Array;
}Expand description
What a function differentiated by value_and_grad returns: the loss alone (an
Array) or the loss with auxiliary outputs ((Array, A) for any tree A, such as
logits or metrics), which are returned as values, without gradients.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".