Adam implementation minor fix (#23737)
Summary:
This PR is in accordance with https://github.com/pytorch/pytorch/issues/22628
I had submitted the PR for `adam.py` and `adamw.py` but had forgotten about the `adam.cpp`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23737
Differential Revision: D16623828
Pulled By: vincentqb
fbshipit-source-id: 4390fd751d1c0cd12f32214b4234d42a06dcbb20