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

训练结果为0 #35

Closed
XaryWorld opened this issue Oct 3, 2023 · 8 comments
Closed

训练结果为0 #35

XaryWorld opened this issue Oct 3, 2023 · 8 comments

Comments

@XaryWorld
Copy link

python main_gs.py --dataset market --testset cuhk03_np_detected的训练结果rank1 为0

QAConv50_IBNb_GS/res50-layer3-f64_pre1_clip512_lr3_bs64-k4_ep15s10:
cuhk03_np_detected: rank1=0.0, mAP=0.2.

@ShengcaiLiao
Copy link
Owner

没有更多信息不好判断。是原始代码的默认参数吗?训练的log呢?

@XaryWorld
Copy link
Author

是原始参数
self.base = torch.hub.load('XingangPan/IBN-Net', model_name, pretrained=pretrained)

self.base = torch.hub.load('/home/server/file/**/Code/QAconv/IBN-Net-master/', model='resnet50_ibn_a', trust_repo=True, source='local')

只改了这一段代码
log.txt

@ShengcaiLiao
Copy link
Owner

ShengcaiLiao commented Oct 3, 2023

应该是ibn_b。另外你多跑几次试试?这个是训练有问题完全没训起来

@XaryWorld
Copy link
Author

resnet50_ibn_b吗?XingangPan/IBN-Net主页只看见了resnet50_ibn_a
跑了很多数据集 包括randperson cuhk03_np_detected 结果不是0就是0.1

@ShengcaiLiao
Copy link
Owner

对,resnet50_ibn_b。不过问题不是它引起。你好像更改了学习率?默认是0.005你试试。

@ShengcaiLiao
Copy link
Owner

ShengcaiLiao commented Oct 3, 2023

self.base = torch.hub.load('/home/server/file/**/Code/QAconv/IBN-Net-master/', model='resnet50_ibn_a', trust_repo=True, source='local')
为了排除你的这个修改导致的问题,建议你先用pytorch自带的resnet50作为base先训练测试一下,就是main函数加上--ibn none这个参数。

@ShengcaiLiao
Copy link
Owner

你用的代码不是最新版,请更新一下。最新版代码没有main_gs.py了。

@XaryWorld
Copy link
Author

谢谢指导,问题已解决
我用的是2.0版本,是模型加载问题,网络下载模型会中断。下载的模型不匹配,更改后没有问题。2.0版本学习率0.001可以正常训练,0.005反而有点问题。

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

2 participants