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

关于CPNet训练问题 #4

Open
menghuaa opened this issue May 16, 2023 · 5 comments
Open

关于CPNet训练问题 #4

menghuaa opened this issue May 16, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@menghuaa
Copy link

menghuaa commented May 16, 2023

您好,我下载了您给的ILSVRC2012数据集,在训练的时候loss感觉没啥显著变化,请问正常吗?loss值大概一直都在下图所示的值附近徘徊,我用了4张A6000训练,没有改变任何参数
image

@zhaoyuzhi
Copy link
Owner

不正常。

我在1张V100上用默认参数(但batch size改成8)训练,开始几个iteration之后Color L1 loss就会降到0.02-0.05的水平。

我也检查了多卡跑起来会不会出错,此时用了4张V100(batch size此时为32),开始几个iteration之后Color L1 loss也会在0.03左右。

建议检查下data读取是不是有问题?

@menghuaa
Copy link
Author

menghuaa commented May 17, 2023

不正常。

我在1张V100上用默认参数(但batch size改成8)训练,开始几个iteration之后Color L1 loss就会降到0.02-0.05的水平。

我也检查了多卡跑起来会不会出错,此时用了4张V100(batch size此时为32),开始几个iteration之后Color L1 loss也会在0.03左右。

建议检查下data读取是不是有问题?

  1. 请问您是用你发布在github上的代码跑的吗?
  2. 另外您是在linux上跑的吗?
  3. 请问您使用4张v100时,改变了哪些参数呢?学习率还是1e-4吗?

@zhaoyuzhi
Copy link
Owner

是啊,clone下来跑的,是linux,就改了个batch size

@menghuaa
Copy link
Author

menghuaa commented May 17, 2023

是啊,clone下来跑的,是linux,就改了个batch size

改了batchsize后,应该是正常了
image
太可怕了,跑到第二个epoch的时候loss突然变大,这个训练这么不稳定的吗,还是哪里又出了问题......
image

请问您训练完imagenet数据集后损失大概能降到多少?我是用4张A6000,batchsize调整为32,其它参数没动,想问下您提供的在imagenet数据集上训练cpnet的运行命令是用几张卡跑的,用什么卡跑的

@zhaoyuzhi
Copy link
Owner

Hi, menghuaa

好久之前训的,具体训练策略写在paper里了,建议先看论文的描述

查了下论文,是 batchsize=4 per GPU and 8 NVIDIA Titan Xp GPUs。具体损失降到多少记不清楚了,我提供了预训练模型,可以加载第一阶段的CPNet接着训就知道loss大概是多少了

关于稳定性的问题,或许是因为之前网络没有采用任何normalization的原因。可以改变下网络initialization策略和调低学习率?这样训练可能更容易一点?

@zhaoyuzhi zhaoyuzhi added the bug Something isn't working label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants