kekmodel / FixMatch-pytorch

Unofficial PyTorch implementation of "FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence"
MIT License
758 stars 170 forks source link

Can not get repo reported accuracy for cifar10@40.5 #29

Closed Kyfafyd closed 3 years ago

Kyfafyd commented 3 years ago

I am following the repo instruction and keep the original code, and run command

python train.py --dataset cifar10 --num-labeled 40 --arch wideresnet --batch-size 64 --lr 0.03 --expand-labels --seed 5 --out results/cifar10@40.5

But I can not get the reported accuracy, from the acc curve, we can see the model reach 90.49% accuracy at 100th epoch, but I can only get around 76%.

Can you help me figure it out?

kekmodel commented 3 years ago

It was much higher than the result of the paper, so I thought it was weird. I will try training again.

fil-mp commented 3 years ago

If you let it train for more epochs it will catch up with the reported (with maybe a slightly less best accuracy but still a lot better than the paper's).

kekmodel commented 3 years ago

I got similar results. Depending on the version of torch, torchvision, and PIL, the acc curve may be slightly different.

Kyfafyd commented 3 years ago

Thanks very much! I got it now!

ljjcoder commented 3 years ago

@Kyfafyd hello,do you reproduce the performance for cifar10@40.5? I also get around 77% accuracy at 100th epoch.