Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add torch.no_grad() guard on export (pytorch#2373)
Summary: Pull Request resolved: pytorch#2373 For some models where the grad is enabled (like LLava model), we need to disable grad before exporting. This PR is to add this guard when using export script. It would not affect the models that grad is not enabled. Reviewed By: cccclai Differential Revision: D54812718 fbshipit-source-id: 639efa5a77839d8d5de52cfa6cb125c883ba54dc
- Loading branch information