Check SparseAdam params are dense on init (#41966) (#43668)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/41966
Raises a value error if user attempts to create SparseAdam optimizer with sparse parameter tensors.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/43668
Reviewed By: glaringlee
Differential Revision: D23388109
Pulled By: ranman
fbshipit-source-id: 1fbcc7527d49eac6fae9ce51b3307c609a6ca38b