pub struct Vjp {
pub forward: Function,
pub backward: Function,
pub num_residuals: usize,
pub differentiable_outputs: Vec<bool>,
}Expand description
The two halves of reverse-mode differentiation, from vjp.
Fields§
§forward: FunctionTakes the inputs of f and returns its outputs, then the residuals.
backward: FunctionTakes the residuals, then a cotangent for each differentiable output
of f, and returns the cotangents of the inputs marked wrt.
num_residuals: usizeThe number of residuals.
differentiable_outputs: Vec<bool>Which outputs of f are differentiable (have a cotangent input).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Vjp
impl !UnwindSafe for Vjp
impl Freeze for Vjp
impl Send for Vjp
impl Sync for Vjp
impl Unpin for Vjp
impl UnsafeUnpin for Vjp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more