Function dfdx::tensor::trace

source · []
pub fn trace<T: Tensor<Tape = OwnedTape>>(t: &T::NoTape) -> T
Expand description

Transforms a NoneTape tensor to an OwnedTape tensor by cloning. Clones t using Tensor::duplicate() (to preserve id), and then inserts OwnedTape as the tape.

See traced() for version that takes ownership of t.