torch.autocast_increment_nesting
function autocast_increment_nesting(): numberIncrements the autocast nesting level.
Autocast uses nesting to track when autocast contexts are entered/exited. This is used internally by autocast context managers.
This is an internal API. Use
torch.autocast() context manager instead. Nesting is not tracked in torch.js.Returns
number– The new nesting level (always 0 in torch.js)Examples
// Internal use only - called by autocast context managers
const level = torch.autocast_increment_nesting();
// Returns: 0See Also
- PyTorch torch.autocast_increment_nesting()
- autocast_decrement_nesting - Decrement nesting level