Fix `torch.backends.cudnn` mypy error (#38947)
Summary:
Fix https://github.com/pytorch/pytorch/issues/38410
![image](https://user-images.githubusercontent.com/6421097/82724121-74b26880-9c99-11ea-9b63-e92de2dccdf2.png)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38947
Differential Revision: D21765290
Pulled By: ezyang
fbshipit-source-id: 5d2b25f039a653c609d60cdaac4a7ac5812ae291