pub trait ComputeInputGradient<T, B: IBackend> {
    // Required method
    fn compute_input_gradient(
        &self,
        backend: &B,
        weights_data: &[&SharedTensor<T>],
        output_data: &[&SharedTensor<T>],
        output_gradients: &[&SharedTensor<T>],
        input_data: &[&SharedTensor<T>],
        input_gradients: &mut [&mut SharedTensor<T>]
    );
}
Expand description

A Layer that can compute the gradient with respect to its input.

Required Methods§

source

fn compute_input_gradient( &self, backend: &B, weights_data: &[&SharedTensor<T>], output_data: &[&SharedTensor<T>], output_gradients: &[&SharedTensor<T>], input_data: &[&SharedTensor<T>], input_gradients: &mut [&mut SharedTensor<T>] )

Compute gradients with respect to the inputs and write them into input_gradients.

Implementors§