Struct burn_tensor::Gradients
source · [−]pub struct Gradients { /* private fields */ }
Implementations
sourceimpl Gradients
impl Gradients
pub fn empty() -> Self
pub fn register<T>(&mut self, node: &BackwardNode<T>)where
T: Zeros<T> + Clone + Add<Output = T>,
T: Debug + 'static + Send + Sync,
pub fn register_any<V>(&mut self, id: String, value: V)where
V: Debug + 'static + Send + Sync,
pub fn from<T>(node: &BackwardNode<T>) -> Selfwhere
T: Zeros<T> + Clone + Add<Output = T>,
T: Debug + 'static + Send + Sync,
pub fn wrt<T: 'static, V: AsNode<T>>(&self, variable: &V) -> Option<&T>
pub fn get<V: 'static>(&self, id: &str) -> Option<&V>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Gradients
impl Send for Gradients
impl Sync for Gradients
impl Unpin for Gradients
impl !UnwindSafe for Gradients
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more