Skip to content

bc2caa7fdf006894eff7af936babde69ab5a40f8-huydhn-debug

Fixes #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: https://github.com/pytorch/pytorch/pull/103528
Approved by: https://github.com/albanD, https://github.com/Skylion007, https://github.com/janeyx99
Assets 2
Loading