pub struct Graph {
pub scalars: RefCell<Vec<Scalar>>,
}Fields§
§scalars: RefCell<Vec<Scalar>>Implementations§
Trait Implementations§
Source§impl Backward for Graph
impl Backward for Graph
fn add_backward(&self, lhs: usize, rhs: usize, grad: f32)
fn sub_backward(&self, lhs: usize, rhs: usize, grad: f32)
fn mul_backward(&self, lhs: usize, rhs: usize, grad: f32)
fn div_backward(&self, lhs: usize, rhs: usize, grad: f32)
fn exp_backward(&self, lhs: usize, grad: f32)
fn pow_backward(&self, lhs: usize, rhs: usize, grad: f32)
fn backward(&self, value: Value<'_>)
fn backward_from(&self, idx: usize)
Source§impl<'a> Operations<'a> for Graph
impl<'a> Operations<'a> for Graph
fn add(&self, lhs_val: Value<'_>, rhs_val: Value<'_>) -> Value<'_>
fn sub(&self, lhs_val: Value<'_>, rhs_val: Value<'_>) -> Value<'_>
fn mul(&self, lhs_val: Value<'_>, rhs_val: Value<'_>) -> Value<'_>
fn div(&self, lhs_val: Value<'_>, rhs_val: Value<'_>) -> Value<'_>
fn exp(&self, lhs_val: Value<'_>) -> Value<'_>
fn pow(&self, lhs_val: Value<'_>, rhs_val: Value<'_>) -> Value<'_>
Auto Trait Implementations§
impl !Freeze for Graph
impl !RefUnwindSafe for Graph
impl Send for Graph
impl !Sync for Graph
impl Unpin for Graph
impl UnwindSafe for Graph
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more