Fix checkfail in ResourceSparseApplyKerasMomentum
> Thanks for the changes! I'm not sure if the current change is comprehensive enough and also a little unclear on what it might fix.

Actually as per Register_Op this Op Args `var` and `accum` are of same type `resource` which Should be from a Variable().

https://github.com/tensorflow/tensorflow/blob/9c1b61a664d66b15d07c25e713d8d96f6bf347c8/tensorflow/core/ops/training_ops.cc#L765-L767

I have checked and found that These args accepting only float32 dtype and with other dtypes (including float64) it checkfails with the error(eg below for complex64) like below.

`
Check failed: dtype() == expected_dtype (8 vs. 1) float expected, got complex64
`

 Hi @sagunb Can you please review this PR ? Thank you! Hi @sagunb Can you please review this PR ? Thank you! Hi @sagunb Can you please review this PR ? Thank you!

 Hi @sagunb Can you please review this PR ? Thank you!


The Op `ResourceSparseApplyKerasMomentum` checkfails if the arguments `var` or `accum` has dtype other than float32.
Proposed a validation check for same.

May Fixes #63720 .