Expand description
A 2d super::Tensor with shape (M, N). Backed by data [[f32; N]; M]
.
Implementations
sourceimpl<const M: usize, const N: usize> Tensor2D<M, N, NoneTape>
impl<const M: usize, const N: usize> Tensor2D<M, N, NoneTape>
sourceimpl<const M: usize, const N: usize, H: Tape> Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Tensor2D<M, N, H>
sourcepub fn value_mask(self, mask: &Tensor2D<M, N, NoneTape>, value: f32) -> Self
pub fn value_mask(self, mask: &Tensor2D<M, N, NoneTape>, value: f32) -> Self
Calls value_mask() on self
sourceimpl<const M: usize, const N: usize, H: Tape> Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Tensor2D<M, N, H>
sourcepub fn normalize<Axes>(self, epsilon: f32) -> Selfwhere
Self: Reduce<Axes>,
<Self as HasArrayType>::Array: HasAxes<Axes>,
pub fn normalize<Axes>(self, epsilon: f32) -> Selfwhere
Self: Reduce<Axes>,
<Self as HasArrayType>::Array: HasAxes<Axes>,
Calls normalize()
sourceimpl<const M: usize, const N: usize, H: Tape> Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Tensor2D<M, N, H>
sourcepub fn logsumexp<T, Axes>(self) -> Twhere
Self: ReduceTo<T, Axes>,
pub fn logsumexp<T, Axes>(self) -> Twhere
Self: ReduceTo<T, Axes>,
Calls logsumexp() on self
with Axes
.
sourcepub fn log_softmax<Axes>(self) -> Selfwhere
Self: Reduce<Axes>,
pub fn log_softmax<Axes>(self) -> Selfwhere
Self: Reduce<Axes>,
Calls log_softmax() on self
with Axes
Trait Implementations
sourceimpl<const M: usize, const N: usize, TapeL: Tape, TapeR: Tape> Add<Tensor2D<M, N, TapeR>> for Tensor2D<M, N, TapeL>where
TapeL: Merge<TapeR>,
impl<const M: usize, const N: usize, TapeL: Tape, TapeR: Tape> Add<Tensor2D<M, N, TapeR>> for Tensor2D<M, N, TapeL>where
TapeL: Merge<TapeR>,
sourceimpl<const M: usize, const N: usize, H: Tape> BroadcastTo<Tensor2D<M, N, H>, AllAxes> for Tensor0D<H>
impl<const M: usize, const N: usize, H: Tape> BroadcastTo<Tensor2D<M, N, H>, AllAxes> for Tensor0D<H>
sourceimpl<const M: usize, const N: usize, H: Tape> BroadcastTo<Tensor2D<M, N, H>, Axis<0>> for Tensor1D<N, H>
impl<const M: usize, const N: usize, H: Tape> BroadcastTo<Tensor2D<M, N, H>, Axis<0>> for Tensor1D<N, H>
sourceimpl<const M: usize, const N: usize, H: Tape> BroadcastTo<Tensor2D<M, N, H>, Axis<1>> for Tensor1D<M, H>
impl<const M: usize, const N: usize, H: Tape> BroadcastTo<Tensor2D<M, N, H>, Axis<1>> for Tensor1D<M, H>
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> BroadcastTo<Tensor3D<M, N, O, H>, Axis<0>> for Tensor2D<N, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> BroadcastTo<Tensor3D<M, N, O, H>, Axis<0>> for Tensor2D<N, O, H>
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> BroadcastTo<Tensor3D<M, N, O, H>, Axis<1>> for Tensor2D<M, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> BroadcastTo<Tensor3D<M, N, O, H>, Axis<1>> for Tensor2D<M, O, H>
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> BroadcastTo<Tensor3D<M, N, O, H>, Axis<2>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> BroadcastTo<Tensor3D<M, N, O, H>, Axis<2>> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<0>, Axis<1>)> for Tensor2D<O, P, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<0>, Axis<1>)> for Tensor2D<O, P, H>
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<0>, Axis<2>)> for Tensor2D<N, P, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<0>, Axis<2>)> for Tensor2D<N, P, H>
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<0>, Axis<3>)> for Tensor2D<N, O, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<0>, Axis<3>)> for Tensor2D<N, O, H>
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<1>, Axis<2>)> for Tensor2D<M, P, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<1>, Axis<2>)> for Tensor2D<M, P, H>
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<1>, Axis<3>)> for Tensor2D<M, O, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<1>, Axis<3>)> for Tensor2D<M, O, H>
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<2>, Axis<3>)> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> BroadcastTo<Tensor4D<M, N, O, P, H>, (Axis<2>, Axis<3>)> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, TapeL: Tape, TapeR: Tape> Div<Tensor2D<M, N, TapeR>> for Tensor2D<M, N, TapeL>where
TapeL: Merge<TapeR>,
impl<const M: usize, const N: usize, TapeL: Tape, TapeR: Tape> Div<Tensor2D<M, N, TapeR>> for Tensor2D<M, N, TapeL>where
TapeL: Merge<TapeR>,
sourceimpl<const M: usize, const N: usize, H> HasArrayData for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H> HasArrayData for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, H> HasArrayType for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H> HasArrayType for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, H> HasUniqueId for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H> HasUniqueId for Tensor2D<M, N, H>
sourceimpl<const M: usize, const K: usize, const N: usize, R: Tape, L: Tape + Merge<R>> MatMulTrTyping<Tensor2D<N, K, R>> for Tensor2D<M, K, L>
impl<const M: usize, const K: usize, const N: usize, R: Tape, L: Tape + Merge<R>> MatMulTrTyping<Tensor2D<N, K, R>> for Tensor2D<M, K, L>
sourceimpl<const B: usize, const M: usize, const K: usize, const N: usize, R: Tape, L: Tape + Merge<R>> MatMulTrTyping<Tensor2D<N, K, R>> for Tensor3D<B, M, K, L>
impl<const B: usize, const M: usize, const K: usize, const N: usize, R: Tape, L: Tape + Merge<R>> MatMulTrTyping<Tensor2D<N, K, R>> for Tensor3D<B, M, K, L>
sourceimpl<const M: usize, const K: usize, const N: usize, R: Tape, L: Tape + Merge<R>> MatMulTyping<Tensor2D<K, N, R>> for Tensor2D<M, K, L>
impl<const M: usize, const K: usize, const N: usize, R: Tape, L: Tape + Merge<R>> MatMulTyping<Tensor2D<K, N, R>> for Tensor2D<M, K, L>
sourceimpl<const B: usize, const M: usize, const K: usize, const N: usize, R: Tape, L: Tape + Merge<R>> MatMulTyping<Tensor2D<K, N, R>> for Tensor3D<B, M, K, L>
impl<const B: usize, const M: usize, const K: usize, const N: usize, R: Tape, L: Tape + Merge<R>> MatMulTyping<Tensor2D<K, N, R>> for Tensor3D<B, M, K, L>
sourceimpl<const B: usize, const I: usize, const O: usize, H: Tape> Module<Tensor2D<B, I, H>> for Linear<I, O>
impl<const B: usize, const I: usize, const O: usize, H: Tape> Module<Tensor2D<B, I, H>> for Linear<I, O>
sourceimpl<H: Tape, const B: usize, const M: usize> Module<Tensor2D<B, M, H>> for LayerNorm1D<M>
impl<H: Tape, const B: usize, const M: usize> Module<Tensor2D<B, M, H>> for LayerNorm1D<M>
sourcefn forward(&self, x: Tensor2D<B, M, H>) -> Self::Output
fn forward(&self, x: Tensor2D<B, M, H>) -> Self::Output
Calls:
- normalize() with Self::epsilon.
- mul() with Self::gamma
- add() with Self::beta
sourceimpl<const M: usize, const N: usize, TapeL: Tape, TapeR: Tape> Mul<Tensor2D<M, N, TapeR>> for Tensor2D<M, N, TapeL>where
TapeL: Merge<TapeR>,
impl<const M: usize, const N: usize, TapeL: Tape, TapeR: Tape> Mul<Tensor2D<M, N, TapeR>> for Tensor2D<M, N, TapeL>where
TapeL: Merge<TapeR>,
sourceimpl<const M: usize, const N: usize, H: Tape> PermuteTo<Tensor2D<M, N, H>, (Axis<0>, Axis<1>)> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> PermuteTo<Tensor2D<M, N, H>, (Axis<0>, Axis<1>)> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, H: Tape> PermuteTo<Tensor2D<N, M, H>, (Axis<1>, Axis<0>)> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> PermuteTo<Tensor2D<N, M, H>, (Axis<1>, Axis<0>)> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, HIn: Tape, HOut: Tape> PutTape<HOut> for Tensor2D<M, N, HIn>
impl<const M: usize, const N: usize, HIn: Tape, HOut: Tape> PutTape<HOut> for Tensor2D<M, N, HIn>
sourceimpl<const A: usize, const B: usize, H: Tape> Reshape<Tensor0D<H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
impl<const A: usize, const B: usize, H: Tape> Reshape<Tensor0D<H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const A: usize, const B: usize, const M: usize, H: Tape> Reshape<Tensor1D<M, H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
impl<const A: usize, const B: usize, const M: usize, H: Tape> Reshape<Tensor1D<M, H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor0D<H>where
Assert<{ _ }>: ConstTrue,
impl<const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor0D<H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const A: usize, const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor1D<A, H>where
Assert<{ _ }>: ConstTrue,
impl<const A: usize, const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor1D<A, H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const A: usize, const B: usize, const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
impl<const A: usize, const B: usize, const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const A: usize, const B: usize, const C: usize, const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor3D<A, B, C, H>where
Assert<{ _ }>: ConstTrue,
impl<const A: usize, const B: usize, const C: usize, const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor3D<A, B, C, H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const A: usize, const B: usize, const C: usize, const D: usize, const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor4D<A, B, C, D, H>where
Assert<{ _ }>: ConstTrue,
impl<const A: usize, const B: usize, const C: usize, const D: usize, const M: usize, const N: usize, H: Tape> Reshape<Tensor2D<M, N, H>> for Tensor4D<A, B, C, D, H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const A: usize, const B: usize, const M: usize, const N: usize, const O: usize, H: Tape> Reshape<Tensor3D<M, N, O, H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
impl<const A: usize, const B: usize, const M: usize, const N: usize, const O: usize, H: Tape> Reshape<Tensor3D<M, N, O, H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const A: usize, const B: usize, const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Reshape<Tensor4D<M, N, O, P, H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
impl<const A: usize, const B: usize, const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Reshape<Tensor4D<M, N, O, P, H>> for Tensor2D<A, B, H>where
Assert<{ _ }>: ConstTrue,
sourceimpl<const M: usize, const N: usize, H: Tape> SelectTo<Tensor1D<M, H>, Axis<1>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> SelectTo<Tensor1D<M, H>, Axis<1>> for Tensor2D<M, N, H>
type Indices = [usize; M]
sourcefn select(self, indices: &Self::Indices) -> Tensor1D<M, H>
fn select(self, indices: &Self::Indices) -> Tensor1D<M, H>
Select sub elements using Self::Indices.
The same element can be selected multiple times depending
on Self::Indices. Read more
sourceimpl<const M: usize, const N: usize, H: Tape> SelectTo<Tensor1D<N, H>, Axis<0>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> SelectTo<Tensor1D<N, H>, Axis<0>> for Tensor2D<M, N, H>
type Indices = usize
sourcefn select(self, indices: &Self::Indices) -> Tensor1D<N, H>
fn select(self, indices: &Self::Indices) -> Tensor1D<N, H>
Select sub elements using Self::Indices.
The same element can be selected multiple times depending
on Self::Indices. Read more
sourceimpl<const M: usize, const B: usize, const Z: usize, H: Tape> SelectTo<Tensor2D<B, Z, H>, Axis<0>> for Tensor1D<M, H>
impl<const M: usize, const B: usize, const Z: usize, H: Tape> SelectTo<Tensor2D<B, Z, H>, Axis<0>> for Tensor1D<M, H>
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> SelectTo<Tensor2D<M, N, H>, Axis<2>> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> SelectTo<Tensor2D<M, N, H>, Axis<2>> for Tensor3D<M, N, O, H>
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> SelectTo<Tensor2D<M, O, H>, Axis<1>> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> SelectTo<Tensor2D<M, O, H>, Axis<1>> for Tensor3D<M, N, O, H>
type Indices = [usize; M]
sourcefn select(self, indices: &Self::Indices) -> Tensor2D<M, O, H>
fn select(self, indices: &Self::Indices) -> Tensor2D<M, O, H>
Select sub elements using Self::Indices.
The same element can be selected multiple times depending
on Self::Indices. Read more
sourceimpl<const M: usize, const N: usize, const Z: usize, H: Tape> SelectTo<Tensor2D<M, Z, H>, Axis<1>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const Z: usize, H: Tape> SelectTo<Tensor2D<M, Z, H>, Axis<1>> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> SelectTo<Tensor2D<N, O, H>, Axis<0>> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> SelectTo<Tensor2D<N, O, H>, Axis<0>> for Tensor3D<M, N, O, H>
type Indices = usize
sourcefn select(self, indices: &Self::Indices) -> Tensor2D<N, O, H>
fn select(self, indices: &Self::Indices) -> Tensor2D<N, O, H>
Select sub elements using Self::Indices.
The same element can be selected multiple times depending
on Self::Indices. Read more
sourceimpl<const M: usize, const N: usize, const Z: usize, H: Tape> SelectTo<Tensor2D<Z, N, H>, Axis<0>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const Z: usize, H: Tape> SelectTo<Tensor2D<Z, N, H>, Axis<0>> for Tensor2D<M, N, H>
type Indices = [usize; Z]
sourcefn select(self, indices: &Self::Indices) -> Tensor2D<Z, N, H>
fn select(self, indices: &Self::Indices) -> Tensor2D<Z, N, H>
Select sub elements using Self::Indices.
The same element can be selected multiple times depending
on Self::Indices. Read more
sourceimpl<const M: usize, const N: usize, const B: usize, const Z: usize, H: Tape> SelectTo<Tensor3D<B, Z, N, H>, Axis<0>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const B: usize, const Z: usize, H: Tape> SelectTo<Tensor3D<B, Z, N, H>, Axis<0>> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, TapeL: Tape, TapeR: Tape> Sub<Tensor2D<M, N, TapeR>> for Tensor2D<M, N, TapeL>where
TapeL: Merge<TapeR>,
impl<const M: usize, const N: usize, TapeL: Tape, TapeR: Tape> Sub<Tensor2D<M, N, TapeR>> for Tensor2D<M, N, TapeL>where
TapeL: Merge<TapeR>,
sourceimpl<const M: usize, const N: usize, H: Tape> Tensor for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Tensor for Tensor2D<M, N, H>
sourcefn split_tape(self) -> (Self::NoTape, Self::Tape)
fn split_tape(self) -> (Self::NoTape, Self::Tape)
Removes whatever Tape this tensor has and returns itself without a tape.
sourcefn with_empty_tape(&self) -> Self
fn with_empty_tape(&self) -> Self
Clones self and initializes a new empty tape.
sourceimpl<const M: usize, const N: usize> TensorCreator for Tensor2D<M, N, NoneTape>
impl<const M: usize, const N: usize> TensorCreator for Tensor2D<M, N, NoneTape>
sourcefn new(data: Self::Array) -> Self
fn new(data: Self::Array) -> Self
Create a new tensor with
Self::Array
on the stack. This just boxes Self::Array
and calls TensorCreator::new_boxed.impl<const M: usize, const N: usize, H: Tape> ReduceTo<Tensor0D<H>, AllAxes> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> ReduceTo<Tensor1D<M, H>, Axis<1>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> ReduceTo<Tensor1D<N, H>, Axis<0>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> ReduceTo<Tensor2D<M, N, H>, (Axis<2>, Axis<3>)> for Tensor4D<M, N, O, P, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> ReduceTo<Tensor2D<M, N, H>, Axis<2>> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> ReduceTo<Tensor2D<M, O, H>, (Axis<1>, Axis<3>)> for Tensor4D<M, N, O, P, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> ReduceTo<Tensor2D<M, O, H>, Axis<1>> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> ReduceTo<Tensor2D<M, P, H>, (Axis<1>, Axis<2>)> for Tensor4D<M, N, O, P, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> ReduceTo<Tensor2D<N, O, H>, (Axis<0>, Axis<3>)> for Tensor4D<M, N, O, P, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> ReduceTo<Tensor2D<N, O, H>, Axis<0>> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> ReduceTo<Tensor2D<N, P, H>, (Axis<0>, Axis<2>)> for Tensor4D<M, N, O, P, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> ReduceTo<Tensor2D<O, P, H>, (Axis<0>, Axis<1>)> for Tensor4D<M, N, O, P, H>
Auto Trait Implementations
impl<const M: usize, const N: usize, Tape> RefUnwindSafe for Tensor2D<M, N, Tape>where
Tape: RefUnwindSafe,
impl<const M: usize, const N: usize, Tape> Send for Tensor2D<M, N, Tape>where
Tape: Send,
impl<const M: usize, const N: usize, Tape> Sync for Tensor2D<M, N, Tape>where
Tape: Sync,
impl<const M: usize, const N: usize, Tape> Unpin for Tensor2D<M, N, Tape>where
Tape: Unpin,
impl<const M: usize, const N: usize, Tape> UnwindSafe for Tensor2D<M, N, Tape>where
Tape: UnwindSafe,
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
sourceimpl<T> CanUpdateWithGradients for Twhere
T: Tensor<Dtype = f32>,
impl<T> CanUpdateWithGradients for Twhere
T: Tensor<Dtype = f32>,
sourcefn update<G>(&mut self, grads: &mut G, unused: &mut UnusedTensors)where
G: GradientProvider,
fn update<G>(&mut self, grads: &mut G, unused: &mut UnusedTensors)where
G: GradientProvider,
Subtracts the gradient for the tensor from HasArrayData::mut_data.