It would be nice for TorchFix to flag when `no_grad` is used both as a decorator and a context manager in the same function: ```python import torch @torch.no_grad def some_func(): with torch.no_grad(): # Redundant to decorator ... ``` Same thing applies for `torch.inference_mode`.
It would be nice for TorchFix to flag when
no_gradis used both as a decorator and a context manager in the same function:Same thing applies for
torch.inference_mode.