EMA model not working
Closed this issue · 2 comments
I use the default configurations etc on a custom dataset and I didn't change anything in the code. However, during evaluation the map score is very low (10 %)
When I change:
model.load_state_dict(checkpoint['state_dict_ema'])
to:
model.load_state_dict(checkpoint['state_dict'])
the map score is a lot higher (~40%). Why isn't the EMA model working?
thank you!
To get the EMA model working, you will need to train the model for many iterations, so that the learned weights can be aggregated into the EMA model. With a short training schedule (# epochs) or a small dataset (# mini batch per epoch), the number of iterations might not be sufficient. If an early stopping is strongly preferred (usually due to a small dataset), EMA should be turned off.
Closed due to inactivity.