[fix] Disable EMA if ema_alpha is set to None (#98992)
Summary: changing the condition to enable ema updates in training, and disable it if the "ema_alpha" value is None
Test Plan: f427638974
Differential Revision: D44937126
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98992
Approved by: https://github.com/msaroufim