Add reset_grad() function (#44423)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/44423
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42754
Test Plan: Imported from OSS
Reviewed By: mruberry
Differential Revision: D23010859
Pulled By: ngimel
fbshipit-source-id: 56eec43eba88b98cbf714841813977c68f983564