pub struct Tape { /* private fields */ }Expand description
Rust-like autodiff tape with operator overloading.
Implementations§
Source§impl Tape
impl Tape
pub fn new() -> Self
pub fn input(&mut self, name: impl Into<String>, value: Float) -> Var
pub fn input_unnamed(&mut self, value: Float) -> Var
pub fn constant(&mut self, value: Float) -> Var
pub fn set_inputs(&mut self, values: &[Float])
pub fn try_set_inputs(&mut self, values: &[Float]) -> Result<(), TapeError>
pub fn set(&mut self, name: &str, value: Float)
pub fn try_set(&mut self, name: &str, value: Float) -> Result<(), TapeError>
pub fn input_names(&self) -> Vec<String>
pub fn gradients(&self, output: &Var) -> Gradients
pub fn gradients_for(&self, outputs: &[Var]) -> Vec<Gradients>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tape
impl !RefUnwindSafe for Tape
impl !Send for Tape
impl !Sync for Tape
impl Unpin for Tape
impl UnsafeUnpin for Tape
impl !UnwindSafe for Tape
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