pub trait Tensor: HasArrayType + HasArrayData + HasDevice + CanUpdateWithGradients + HasUniqueId + IntoPhantom + ResetId {
type Tape: Tape;
type NoTape: 'static + Tensor<Array = Self::Array, Dtype = Self::Dtype, Tape = NoneTape, NoTape = Self::NoTape> + TensorCreator + PutTape<Self::Tape, Output = Self> + Clone;
fn split_tape(self) -> (Self::NoTape, Self::Tape);
fn with_empty_tape(&self) -> Self;
}
Expand description
The main tensor trait. A tensor consists of mainly 1. an array, 2. a device, 3. a unique id.
Required Associated Types
Required Methods
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.