Trait dfdx::tensor::SplitTape

source ·
pub trait SplitTape {
    type Tape;
    type NoTape: Clone + PutTape<Self::Tape, Output = Self>;

    // Required method
    fn split_tape(self) -> (Self::NoTape, Self::Tape);
}
Expand description

Remove the tape from a tensor

Required Associated Types§

source

type Tape

The type of tape the tensor has now

source

type NoTape: Clone + PutTape<Self::Tape, Output = Self>

Required Methods§

source

fn split_tape(self) -> (Self::NoTape, Self::Tape)

Splits tape off of self

let a: Tensor<Rank1<5>, f32, _, OwnedTape<f32, _>> = dev.zeros().traced(grads);
let (a, tape): (Tensor<_, _, _, NoneTape>, OwnedTape<f32, _>) = a.split_tape();

Implementors§

source§

impl<S: Shape, E: Clone, D: Storage<E>, T> SplitTape for Tensor<S, E, D, T>

§

type Tape = T

§

type NoTape = Tensor<S, E, D, NoneTape>