mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix unexpected inference_mode interaction with torch.autograd.functional.jacobian (#130307)
Fixes #128264 Pull Request resolved: https://github.com/pytorch/pytorch/pull/130307 Approved by: https://github.com/soulitzer
This commit is contained in:
committed by
PyTorch MergeBot
parent
dc1959e6a7
commit
7af38eb98b
@ -240,9 +240,9 @@ This better runtime comes with a drawback: tensors created in inference mode
|
||||
will not be able to be used in computations to be recorded by autograd after
|
||||
exiting inference mode.
|
||||
|
||||
Enable inference mode when you are performing computations that don’t need
|
||||
to be recorded in the backward graph, AND you don’t plan on using the tensors
|
||||
created in inference mode in any computation that is to be recorded by autograd later.
|
||||
Enable inference mode when you are performing computations that do not have
|
||||
interactions with autograd, AND you don’t plan on using the tensors created
|
||||
in inference mode in any computation that is to be recorded by autograd later.
|
||||
|
||||
It is recommended that you try out inference mode in the parts of your code
|
||||
that do not require autograd tracking (e.g., data processing and model evaluation).
|
||||
|
Reference in New Issue
Block a user