fix standard deviation gradient NaN behavior (#45468)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/4320
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45468
Reviewed By: zhangguanheng66
Differential Revision: D23991064
Pulled By: albanD
fbshipit-source-id: d4274895f2dac8b2cdbd73e5276ce3df466fc341