Skip to main content

GradOutput

Trait GradOutput 

Source
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§

Source

fn loss(&self) -> &Array

The 0-D loss.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<A: Tree> GradOutput for (Array, A)

Source§

fn loss(&self) -> &Array

Implementors§