Skip to main content

Module tensor

Module tensor 

Source
Expand description

Tensor Module

The Tensor type: storage on a CPU or GPU Device, differentiable ops, and the autograd engine.

Structs§

NoGradGuard
Disables gradient tracking on this thread until dropped.
Tensor
A multi-dimensional f32 array on a Device, with reverse-mode automatic differentiation.

Functions§

is_grad_enabled
True unless inside no_grad (per thread).
no_grad
Run f without recording ops for autograd (inference, optimizer updates, metric computation).