pub trait Tensor: HasArrayType + HasArrayData + HasDevice + CanUpdateWithGradients + HasUniqueId + IntoPhantom {
    type Tape: Tape;
    type NoTape: 'static + Tensor<Array = Self::Array, Dtype = Self::Dtype, Tape = NoTape> + TensorCreator + PutTape<Self::Tape, Output = Self> + Clone;
    type OwnsTape: 'static + Tensor<Array = Self::Array, Dtype = Self::Dtype, Tape = OwnsTape>;
    type LastDimReduced: Tensor<Tape = Self::Tape, Dtype = Self::Dtype, Array = <Self::Device as ReduceLastDim<Self::Array>>::Reduced>;

    fn split_tape(self) -> (Self::NoTape, Self::Tape);
    fn duplicate(&self) -> Self::NoTape;
}
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

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

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

Implementors