pub struct Tensor3D<const M: usize, const N: usize, const O: usize, TapeHolder = NoTape> { /* private fields */ }
Expand description

A 3d [Tensor] with shape (M, N, O). Backed by data [[[f32; O]; N]; M].

Implementations

Calls backward on self

Clones self and returns a copy with WithTape as the TapeHolder.

See traced for a version that takes ownership of the tensor.

Takes ownership of self and inserts WithTape as the TapeHolder.

Calls [$func_name] on self

Calls [$func_name] on self

Calls [$func_name] on self

Calls [$func_name] on self

Calls [$func_name] on self

Calls [$func_name] on self

Calls [$func_name] on self

Calls [$func_name] on self

Calls [$func_name] on self

Calls [$func_name] on self

Calls clamp on self

Calls value_mask on self

Calls mean() on self.

Calls nans_to on self.

Calls logsumexp on self.

Calls log_softmax on self

Calls softmax on self

Calls sum_last_dim() on self.

Trait Implementations

Calls add() - implements &T<NoTape> + T<H>

The resulting type after applying the + operator.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Calls div() - implements &T<NoTape> / T<H>

The resulting type after applying the / operator.

Calls mul() - implements &T<NoTape> * T<H>

The resulting type after applying the * operator.

Calls negate on self.

The resulting type after applying the - operator.

Calls sub() - implements &T<NoTape> - T<H>

The resulting type after applying the - operator.

Removes whatever TapeHolder this tensor has and returns itself without a tape.

Clones the data & UniqueId of this tensor and returns something with NoTape.

Create a new tensor with a Box<Self::Array>.

Create a new tensor with Self::Array on the stack. This just boxes Self::Array and calls TensorCreator::new_boxed.

Creates a tensor filled with all 0s.

Creates a tensor filled with all 1s.

Creates a tensor filled with values sampled from Standard distribution.

Creates a tensor filled with values sampled from StandardNormal distribution.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.