Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the EMA implementation code in this repository wrong? #38

Open
prowontheus opened this issue Oct 30, 2023 · 1 comment
Open

Is the EMA implementation code in this repository wrong? #38

prowontheus opened this issue Oct 30, 2023 · 1 comment

Comments

@prowontheus
Copy link

prowontheus commented Oct 30, 2023

in the update_average function of EMA class in modules.py,the update step is:
old * self.beta + (1 - self.beta) * new
should it be "new * self.beta + (1 - self.beta) * old"?

@draym28
Copy link

draym28 commented Jun 6, 2024

actually, the code is correct.
the formula of EMA is (suppose the weight beta=0.9):
new = beta * old + (1-beta) * current
the new average should be "a lot of old parts + a few new parts".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants