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> Tensor2D<M, N, OwnedTape>
impl<const M: usize, const N: usize> Tensor2D<M, N, OwnedTape>
sourcepub fn backward(self) -> Gradients
pub fn backward(self) -> Gradients
Calls backward() 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 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 mean_axis<const I: isize>(self) -> <Self as Reduce1<I>>::Reduced where
Self: Reduce1<I>,
<Self as HasArrayType>::Array: HasAxis<I>,
pub fn mean_axis<const I: isize>(self) -> <Self as Reduce1<I>>::Reduced where
Self: Reduce1<I>,
<Self as HasArrayType>::Array: HasAxis<I>,
Calls mean_axis() 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_axis<const I: isize>(self, epsilon: f32) -> Self where
Self: Reduce1<I>,
<Self as HasArrayType>::Array: HasAxis<I>,
pub fn normalize_axis<const I: isize>(self, epsilon: f32) -> Self where
Self: Reduce1<I>,
<Self as HasArrayType>::Array: HasAxis<I>,
Calls normalize_axis() 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 logsumexp(self) -> <Self as Reduce1<{ _ }>>::Reduced
pub fn logsumexp(self) -> <Self as Reduce1<{ _ }>>::Reduced
Calls logsumexp() on self
.
sourcepub fn log_softmax(self) -> Self
pub fn log_softmax(self) -> Self
Calls log_softmax() 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 std_axis<const I: isize>(
self,
epsilon: f32
) -> <Self as Reduce1<I>>::Reduced where
Self: Reduce1<I>,
<Self as HasArrayType>::Array: HasAxis<I>,
pub fn std_axis<const I: isize>(
self,
epsilon: f32
) -> <Self as Reduce1<I>>::Reduced where
Self: Reduce1<I>,
<Self as HasArrayType>::Array: HasAxis<I>,
Calls std_axis() on self
.
sourcepub fn var_axis<const I: isize>(self) -> <Self as Reduce1<I>>::Reduced where
Self: Reduce1<I>,
<Self as HasArrayType>::Array: HasAxis<I>,
pub fn var_axis<const I: isize>(self) -> <Self as Reduce1<I>>::Reduced where
Self: Reduce1<I>,
<Self as HasArrayType>::Array: HasAxis<I>,
Calls var_axis() on self
.
Trait Implementations
sourceimpl<const M: usize, const N: usize, H: Tape> Add<&Tensor2D<M, N, NoneTape>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Add<&Tensor2D<M, N, NoneTape>> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, H: Tape> Broadcast1<Tensor2D<M, N, H>, -1> for Tensor1D<M, H>
impl<const M: usize, const N: usize, H: Tape> Broadcast1<Tensor2D<M, N, H>, -1> for Tensor1D<M, H>
sourcefn broadcast1(self) -> Tensor2D<M, N, H>
fn broadcast1(self) -> Tensor2D<M, N, H>
Broadcast self
into T
, increasing number dimensions by 1.
sourceimpl<const M: usize, const N: usize, H: Tape> Broadcast1<Tensor2D<M, N, H>, 0> for Tensor1D<N, H>
impl<const M: usize, const N: usize, H: Tape> Broadcast1<Tensor2D<M, N, H>, 0> for Tensor1D<N, H>
sourcefn broadcast1(self) -> Tensor2D<M, N, H>
fn broadcast1(self) -> Tensor2D<M, N, H>
Broadcast self
into T
, increasing number dimensions by 1.
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> Broadcast1<Tensor3D<M, N, O, H>, -1> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> Broadcast1<Tensor3D<M, N, O, H>, -1> for Tensor2D<M, N, H>
sourcefn broadcast1(self) -> Tensor3D<M, N, O, H>
fn broadcast1(self) -> Tensor3D<M, N, O, H>
Broadcast self
into T
, increasing number dimensions by 1.
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> Broadcast1<Tensor3D<M, N, O, H>, 0> for Tensor2D<N, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> Broadcast1<Tensor3D<M, N, O, H>, 0> for Tensor2D<N, O, H>
sourcefn broadcast1(self) -> Tensor3D<M, N, O, H>
fn broadcast1(self) -> Tensor3D<M, N, O, H>
Broadcast self
into T
, increasing number dimensions by 1.
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> Broadcast1<Tensor3D<M, N, O, H>, 1> for Tensor2D<M, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> Broadcast1<Tensor3D<M, N, O, H>, 1> for Tensor2D<M, O, H>
sourcefn broadcast1(self) -> Tensor3D<M, N, O, H>
fn broadcast1(self) -> Tensor3D<M, N, O, H>
Broadcast self
into T
, increasing number dimensions by 1.
sourceimpl<const M: usize, const N: usize, H: Tape> Broadcast2<Tensor2D<M, N, H>, 0, 1> for Tensor0D<H>
impl<const M: usize, const N: usize, H: Tape> Broadcast2<Tensor2D<M, N, H>, 0, 1> for Tensor0D<H>
sourcefn broadcast2(self) -> Tensor2D<M, N, H>
fn broadcast2(self) -> Tensor2D<M, N, H>
Broadcast self
into T
, increasing number dimensions by 2.
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 0, 1> for Tensor2D<O, P, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 0, 1> for Tensor2D<O, P, H>
sourcefn broadcast2(self) -> Tensor4D<M, N, O, P, H>
fn broadcast2(self) -> Tensor4D<M, N, O, P, H>
Broadcast self
into T
, increasing number dimensions by 2.
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 0, 2> for Tensor2D<N, P, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 0, 2> for Tensor2D<N, P, H>
sourcefn broadcast2(self) -> Tensor4D<M, N, O, P, H>
fn broadcast2(self) -> Tensor4D<M, N, O, P, H>
Broadcast self
into T
, increasing number dimensions by 2.
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 0, 3> for Tensor2D<N, O, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 0, 3> for Tensor2D<N, O, H>
sourcefn broadcast2(self) -> Tensor4D<M, N, O, P, H>
fn broadcast2(self) -> Tensor4D<M, N, O, P, H>
Broadcast self
into T
, increasing number dimensions by 2.
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 1, 2> for Tensor2D<M, P, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 1, 2> for Tensor2D<M, P, H>
sourcefn broadcast2(self) -> Tensor4D<M, N, O, P, H>
fn broadcast2(self) -> Tensor4D<M, N, O, P, H>
Broadcast self
into T
, increasing number dimensions by 2.
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 1, 3> for Tensor2D<M, O, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 1, 3> for Tensor2D<M, O, H>
sourcefn broadcast2(self) -> Tensor4D<M, N, O, P, H>
fn broadcast2(self) -> Tensor4D<M, N, O, P, H>
Broadcast self
into T
, increasing number dimensions by 2.
sourceimpl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 2, 3> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const O: usize, const P: usize, H: Tape> Broadcast2<Tensor4D<M, N, O, P, H>, 2, 3> for Tensor2D<M, N, H>
sourcefn broadcast2(self) -> Tensor4D<M, N, O, P, H>
fn broadcast2(self) -> Tensor4D<M, N, O, P, H>
Broadcast self
into T
, increasing number dimensions by 2.
sourceimpl<const M: usize, const N: usize, H: Tape> Div<&Tensor2D<M, N, NoneTape>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Div<&Tensor2D<M, N, NoneTape>> for Tensor2D<M, N, H>
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 N: usize, const K: usize, H> MatMulTrTyping<Tensor2D<N, K, NoneTape>> for Tensor2D<M, K, H>
impl<const M: usize, const N: usize, const K: usize, H> MatMulTrTyping<Tensor2D<N, K, NoneTape>> for Tensor2D<M, K, H>
sourceimpl<const B: usize, const M: usize, const N: usize, const K: usize, H> MatMulTrTyping<Tensor2D<N, K, NoneTape>> for Tensor3D<B, M, K, H>
impl<const B: usize, const M: usize, const N: usize, const K: usize, H> MatMulTrTyping<Tensor2D<N, K, NoneTape>> for Tensor3D<B, M, K, H>
sourceimpl<const M: usize, const N: usize, const K: usize, H> MatMulTyping<Tensor2D<K, N, NoneTape>> for Tensor2D<M, K, H>
impl<const M: usize, const N: usize, const K: usize, H> MatMulTyping<Tensor2D<K, N, NoneTape>> for Tensor2D<M, K, H>
sourceimpl<const B: usize, const M: usize, const N: usize, const K: usize, H> MatMulTyping<Tensor2D<K, N, NoneTape>> for Tensor3D<B, M, K, H>
impl<const B: usize, const M: usize, const N: usize, const K: usize, H> MatMulTyping<Tensor2D<K, N, NoneTape>> for Tensor3D<B, M, K, H>
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>
sourcefn forward_mut(&mut self, input: Input) -> Self::Output
fn forward_mut(&mut self, input: Input) -> Self::Output
Pass an Input
through the unit and produce Self::Output.
Can be implemented for multiple Input
types. Read more
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_axis::<-1>()] with Self::epsilon.
- mul() with Self::gamma
- add() with Self::beta
sourcefn forward_mut(&mut self, input: Input) -> Self::Output
fn forward_mut(&mut self, input: Input) -> Self::Output
Pass an Input
through the unit and produce Self::Output.
Can be implemented for multiple Input
types. Read more
sourceimpl<const M: usize, const K: usize, const V: usize, const S: usize, const H: usize, T: 'static + Tape> Module<Tensor2D<S, M, T>> for MultiHeadAttention<M, M, K, V, H> where
Assert<{ _ }>: ConstTrue,
Assert<{ _ }>: ConstTrue,
Assert<{ _ }>: ConstTrue,
impl<const M: usize, const K: usize, const V: usize, const S: usize, const H: usize, T: 'static + Tape> Module<Tensor2D<S, M, T>> for MultiHeadAttention<M, M, K, V, H> where
Assert<{ _ }>: ConstTrue,
Assert<{ _ }>: ConstTrue,
Assert<{ _ }>: ConstTrue,
sourcefn forward(&self, input: Tensor2D<S, M, T>) -> Self::Output
fn forward(&self, input: Tensor2D<S, M, T>) -> Self::Output
Normal self attention (where same tensors are used for keys, queries and values)
sourcefn forward_mut(&mut self, input: Input) -> Self::Output
fn forward_mut(&mut self, input: Input) -> Self::Output
Pass an Input
through the unit and produce Self::Output.
Can be implemented for multiple Input
types. Read more
sourceimpl<const M: usize, const N: usize, H: Tape> Mul<&Tensor2D<M, N, NoneTape>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Mul<&Tensor2D<M, N, NoneTape>> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, HIn, HOut> PutTape<HOut> for Tensor2D<M, N, HIn> where
HIn: Tape,
HOut: Tape,
impl<const M: usize, const N: usize, HIn, HOut> PutTape<HOut> for Tensor2D<M, N, HIn> where
HIn: Tape,
HOut: Tape,
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> Select1<Tensor1D<M, H>, -1> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Select1<Tensor1D<M, H>, -1> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, H: Tape> Select1<Tensor1D<N, H>, 0> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Select1<Tensor1D<N, H>, 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 N: usize, const O: usize, H: Tape> Select1<Tensor2D<M, N, H>, -1> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> Select1<Tensor2D<M, N, H>, -1> for Tensor3D<M, N, O, H>
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> Select1<Tensor2D<M, O, H>, 1> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> Select1<Tensor2D<M, O, H>, 1> for Tensor3D<M, N, O, H>
sourceimpl<const M: usize, const N: usize, const Z: usize, H: Tape> Select1<Tensor2D<M, Z, H>, -1> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const Z: usize, H: Tape> Select1<Tensor2D<M, Z, H>, -1> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, const O: usize, H: Tape> Select1<Tensor2D<N, O, H>, 0> for Tensor3D<M, N, O, H>
impl<const M: usize, const N: usize, const O: usize, H: Tape> Select1<Tensor2D<N, O, H>, 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> Select1<Tensor2D<Z, N, H>, 0> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, const Z: usize, H: Tape> Select1<Tensor2D<Z, N, H>, 0> for Tensor2D<M, N, H>
sourceimpl<const M: usize, const N: usize, H: Tape> Sub<&Tensor2D<M, N, NoneTape>> for Tensor2D<M, N, H>
impl<const M: usize, const N: usize, H: Tape> Sub<&Tensor2D<M, N, NoneTape>> for Tensor2D<M, N, H>
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.
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_boxed(data: Box<Self::Array>) -> Self
fn new_boxed(data: Box<Self::Array>) -> Self
Returns a new object with data
and a new UniqueId.
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.
sourcefn rand<R: Rng>(rng: &mut R) -> Self where
Standard: Distribution<Self::Dtype>,
fn rand<R: Rng>(rng: &mut R) -> Self where
Standard: Distribution<Self::Dtype>,
Creates a tensor filled with values sampled from Standard distribution.
sourcefn randn<R: Rng>(rng: &mut R) -> Self where
StandardNormal: Distribution<Self::Dtype>,
fn randn<R: Rng>(rng: &mut R) -> Self where
StandardNormal: Distribution<Self::Dtype>,
Creates a tensor filled with values sampled from StandardNormal distribution.
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 = NoneTape> !Send for Tensor2D<M, N, Tape>
impl<const M: usize, const N: usize, Tape = NoneTape> !Sync for Tensor2D<M, N, Tape>
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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 T where
T: Tensor<Dtype = f32>,
impl<T> CanUpdateWithGradients for T where
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.