korrawe / guided-motion-diffusion

Other
142 stars 9 forks source link

Using the averaged model #6

Closed GuyTevet closed 11 months ago

GuyTevet commented 11 months ago

Hi @korrawe , Great work!

(1) It seems that when sampling the model, you avoid using the averaged model. Is that true? If so, why? https://github.com/korrawe/guided-motion-diffusion/blob/e54268d96e097a3c99b314860509dae82e2dd749/sample/generate.py#L175

(2) During training, do you update the optimized model (self.model) to be the averaged model (self.model_avg)? If so, where?

korrawe commented 11 months ago

Hi Guy, long time no see!

For (1), thank you for pointing this out, it should use the average model! It seems I forgot to set the default flag back to 'True' when I refactored and checked the code for release (this will not affect the eval in the paper but will probably change the result if you used this code for inference). The expected behavior is to load the average model whenever available and use it for sampling. I fixed the default flag to 'True' now with the new commit.

(2) No, the optimized model will not be updated according to the average model. It will be updated as if the average model does not exist. The expected behavior when (1) is correct is to only load self.model_avg for inference.

GuyTevet commented 11 months ago

Thanks again @korrawe ! Hope to see you soon:) Closing for now.