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

Evaluation Mode doesn't work. #202

Open
Leanna97 opened this issue Apr 28, 2023 · 5 comments
Open

Evaluation Mode doesn't work. #202

Leanna97 opened this issue Apr 28, 2023 · 5 comments

Comments

@Leanna97
Copy link

Thanks for your great work. I train my 'vig_ti_224_gelu' model and the accuracy reaches 78.22%. These results are from the summary.csv generated during training. When I try to resume the saved checkpoint using '--resume', it works well. However, when I tried to evaluate the saved model using '--evaluate', the results become 1.04% and the loss is nan. Could anyone help me to solve this problem?

summary.csv:
image

'--evaluate':
image

@YatingHuang7
Copy link

Thanks for your great work. I train my 'vig_ti_224_gelu' model and the accuracy reaches 78.22%. These results are from the summary.csv generated during training. When I try to resume the saved checkpoint using '--resume', it works well. However, when I tried to evaluate the saved model using '--evaluate', the results become 1.04% and the loss is nan. Could anyone help me to solve this problem?

summary.csv: image

'--evaluate': image

Hi, Have you found a solution? I have the same problem。

@iamhankai
Copy link
Member

I think it's the version issue. Please refer to #219 (comment)

@FreeZ3e
Copy link

FreeZ3e commented Mar 23, 2024

Same problem, I tried torchvision==0.8.2, torch==1.7.1, timm==0.3.2 and CUDA11.0. But didn't work in evaluate mode.

@xxrrnn
Copy link

xxrrnn commented Apr 11, 2024

我通过改变imagenet的文件结构解决了问题。我的imagenet结构中,val里面是很多jpeg,而train里面是很多文件夹。根据#219老哥的colab,应该是val里面很多文件夹,train里面1个文件夹。因此只需要将二者的名称交换,就能够输出正确的结果。

@FreeZ3e
Copy link

FreeZ3e commented Apr 25, 2024

I solved this problem by using "--resume" to load pretrained model instead of "--pretrain_path".
If you want use "--pretrain_path" to evaluate model, plz use "torch.save()" to save model first.

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