To refactor Sparse Adam algorithm for functional form (#59171)
Summary:
Adds Functional Interface for Sparse Adam Optimizer.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59171
Reviewed By: vincentqb
Differential Revision: D29360582
Pulled By: iramazanli
fbshipit-source-id: 5ceffd7f4b7abd1e0b758a5b8445abdf5555eba0