Autograd ops
Unreleased native NuTorch shell reference. Generated by
scripts/gen-ops-reference.ts; every op also documents itself with
torch <op> --help. Tensor operands are native values, not strings.
backward
backpropagate from a scalar loss (gradients accumulate)
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch backward <t1>
grad
snapshot of a tensor’s accumulated gradient
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch grad <t1>
detach
a graph-free reference to the same data
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch detach <t1>
zero_grad
zero a tensor’s accumulated gradient in place
Signature (placeholders describe arguments; this is not a runnable example):
use torch
torch zero_grad <t1>