Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add type hint for retains_grad (pytorch#103528)
Fixes pytorch#103485 Type checkers don't know about the existence of `retains_grad` otherwise: ```python torch.randn(10, 10).retains_grad # Cannot access member "retains_grad" for type "Tensor" ``` Pull Request resolved: pytorch#103528 Approved by: https://github.com/albanD, https://github.com/Skylion007, https://github.com/janeyx99
- Loading branch information