Averaging parameters

Hi,
I have several models from the same architecture, and I want to average them, at the end of each training. Is there any straightforward way to do that?

I think maybe you can average the state_dict.
(Pay special attention to BatchNorm)