Function dfdx::tensor_ops::recip

source ·
pub fn recip<S: Shape, E: Dtype, D: UnaryKernel<RecipKernelOp, E>, T: Tape<E, D>>(
    t: Tensor<S, E, D, T>
) -> Tensor<S, E, D, T>
Expand description

1 / x

Examples:

let t = dev.tensor([-1.0, 0.0, 1.0, 2.0]);
let r = t.recip();