Use amax/maximum instead of max in optimizers (#43797)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/43797
Reviewed By: malfet
Differential Revision: D23406641
Pulled By: mruberry
fbshipit-source-id: 0cd075124aa6533b21375fe2c90c44a5d05ad6e6