Shortcuts

Function torch::autograd::forward_ad::exit_dual_level

Function Documentation

void torch::autograd::forward_ad::exit_dual_level(uint64_t level)

Exits the given level.

This will clear up all the gradients from this level and all dual Tensors that had gradients for this level will become regular Tensors again. This function can only be used to exit the innermost nesting level and so exiting must happen in reverse order compared to the entering that was done with the function above.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources