-
Notifications
You must be signed in to change notification settings - Fork 23
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
checkpoint from main_train.py is mismatch with the one need in demo.ipynb #17
Comments
因为 {
"model": <state_dict of model>,
"optimizer": <state_dict of model>,
......
} 为了节省大小, 这里是我使用的重新save checkpoint的样例`Python脚本: import torch
model = torch.load("/mnt/data0/xiaochen/workspace/IML-VIT/output_dir/checkpoint-150.pth")
output = model['model']
torch.save(output, "checkpoint-150.pth") English version: The issue is that the checkpoint obtained from {
"model": <state_dict of model>,
"optimizer": <state_dict of model>,
......
} To save space, demo.ipynb by default only reads the model parameters. In other words, it expects to read a PyTorch checkpoint file that only contains an object of <state_dict of model>. So, you can achieve this by modifying the Here is an example Python script I used to re-save the checkpoint: import torch
model = torch.load("/mnt/data0/xiaochen/workspace/IML-VIT/output_dir/checkpoint-150.pth")
output = model['model']
torch.save(output, "checkpoint-150.pth") |
因为这可能是一个commen issue,所以我这里额外提供一个英文的version。 |
|
收到,感谢! |
作者您好,我采用CASIAV2进行训练,CASIAV1作为验证,使用第108轮的权重文件在demo.ipynb上可视化示例图。遇到了以下问题:
图片可视化效果几乎不可见,使用训练集中的数据进行demo,效果也如上。
这是我的训练log.txt
使用您提供的权重文件进行可视化demo时,效果都正常
The text was updated successfully, but these errors were encountered: