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

训练时出错,使用最新版配置文件2020Track2.yml进行训练出现错误 #18

Open
LiYAnErr opened this issue Mar 29, 2022 · 2 comments

Comments

@LiYAnErr
Copy link

(1)问题一:KeyError: 'netDeg'
Traceback (most recent call last):
File "train.py", line 481, in
main()
File "train.py", line 171, in main
main_worker(0, 1, opt, args)
File "train.py", line 305, in main_worker
model.optimize_parameters(current_step)
File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/deg_sr_model.py", line 235, in optimize_parameters
loss_dict = self.optimize_trans_models(step, loss_dict)
File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/deg_sr_model.py", line 149, in optimize_trans_models
self.set_optimizer(names=["netDeg"], operation="zero_grad")
File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/base_model.py", line 174, in set_optimizer
getattr(self.optimizers[name], operation)()
KeyError: 'netDeg'

(2)问题二:KeyError:'lr_adv'
Traceback (most recent call last):
File "train.py", line 481, in
main()
File "train.py", line 171, in main
main_worker(0, 1, opt, args)
File "train.py", line 305, in main_worker
model.optimize_parameters(current_step)
File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/deg_sr_model.py", line 235, in optimize_parameters
loss_dict = self.optimize_trans_models(step, loss_dict)
File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/deg_sr_model.py", line 164, in optimize_trans_models
self.netD1, self.losses["lr_adv"],
KeyError: 'lr_adv'

这两个问题都是训练时需要用到的键值在配置文件中没有。

  • 问题一:KeyError: 'netDeg' 是在2020Track2.yml缺少优化器netDeg
  • 问题二:KeyError:'lr_adv' 是在2020Track2.yml中缺少损失函数lr_adv

请问作者是2020Track2.yml确有上述问题,还是我某些文件没有用到最新版呢?谢谢作者~

@mrgreen3325
Copy link

(1)问题一:KeyError: 'netDeg' Traceback (most recent call last): File "train.py", line 481, in main() File "train.py", line 171, in main main_worker(0, 1, opt, args) File "train.py", line 305, in main_worker model.optimize_parameters(current_step) File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/deg_sr_model.py", line 235, in optimize_parameters loss_dict = self.optimize_trans_models(step, loss_dict) File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/deg_sr_model.py", line 149, in optimize_trans_models self.set_optimizer(names=["netDeg"], operation="zero_grad") File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/base_model.py", line 174, in set_optimizer getattr(self.optimizers[name], operation)() KeyError: 'netDeg'

(2)问题二:KeyError:'lr_adv' Traceback (most recent call last): File "train.py", line 481, in main() File "train.py", line 171, in main main_worker(0, 1, opt, args) File "train.py", line 305, in main_worker model.optimize_parameters(current_step) File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/deg_sr_model.py", line 235, in optimize_parameters loss_dict = self.optimize_trans_models(step, loss_dict) File "/6T/home/dell/LiYAnErr/UseMyDataRunBaseline/UnpairedSR-master/codes/config/PDM-SR/models/deg_sr_model.py", line 164, in optimize_trans_models self.netD1, self.losses["lr_adv"], KeyError: 'lr_adv'

这两个问题都是训练时需要用到的键值在配置文件中没有。

  • 问题一:KeyError: 'netDeg' 是在2020Track2.yml缺少优化器netDeg
  • 问题二:KeyError:'lr_adv' 是在2020Track2.yml中缺少损失函数lr_adv

请问作者是2020Track2.yml确有上述问题,还是我某些文件没有用到最新版呢?谢谢作者~

Hello,
did you solve this problem?
I am going to try to use the 2020Track2.yml,
Is there any I need to pay attention?

@LaurenceQ
Copy link

您好,我遇见了同样的问题,请问您是如何解决这个问题的?

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

3 participants