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

train failed when EMA mode is off #42

Open
frozenzo opened this issue Jun 19, 2021 · 5 comments
Open

train failed when EMA mode is off #42

frozenzo opened this issue Jun 19, 2021 · 5 comments

Comments

@frozenzo
Copy link

I found that this is because the model.train() did not open again when evaluation ends.
solution: just move mode.train() to the epoch loop:

  • model.train()
    for epoch in range(args.start_epoch, args.epochs):

->

for epoch in range(args.start_epoch, args.epochs):

  •    model.train()
    
@frozenzo
Copy link
Author

dear author, could you kindly show results that did not use EMA for testing?

@DingYuan0118
Copy link

DingYuan0118 commented Dec 6, 2021

same question here. Considering the long training time, I wanna know did you finish the training for the fixed version?

@kekmodel
Copy link
Owner

kekmodel commented Feb 9, 2022

It's late, but I'll check.

@TonyLianLong
Copy link

I met exactly the same thing: on the second epoch, the loss becomes nan without modification when EMA is off.

@dahuaxiya
Copy link

yes, I met the same thing too. If test the model, the loss will be nan when ema is closed.However, the loss is normal without test step.

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

5 participants