megengine.amp.GradScaler.unscale

GradScaler.unscale(grad_tensors)[源代码]

Unscale all grad_tensors’s grad.

参数

grad_tensors (Iterable[Tensor]) – Tensors needed to unscale grads. Should be all tensors that are affected by target tensor in GradManager’s backward.