FixMatch-pytorch
FixMatch-pytorch copied to clipboard
train failed when EMA mode is off
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()
dear author, could you kindly show results that did not use EMA for testing?
same question here. Considering the long training time, I wanna know did you finish the training for the fixed version?
It's late, but I'll check.
I met exactly the same thing: on the second epoch, the loss becomes nan
without modification when EMA is off.
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.