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

    fn split_tape_holder(self) -> (Self::NoTape, Self::TapeHolder);
    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 TapeHolder this tensor has and returns itself without a tape.

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

Implementors