fixes #20178 (#23297)
Summary:
fixes https://github.com/pytorch/pytorch/issues/20178
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23297
Differential Revision: D16497552
Pulled By: VitalyFedyunin
fbshipit-source-id: 386933b15c27d02351f042be71b153bc9439004d