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

单卡训练报错 #36

Open
zdyshine opened this issue Jan 19, 2024 · 1 comment
Open

单卡训练报错 #36

zdyshine opened this issue Jan 19, 2024 · 1 comment

Comments

@zdyshine
Copy link

Traceback (most recent call last):
File "DiffIR/train.py", line 15, in
train_pipeline(root_path)
File "/DiffIR/DiffIR-RealSR/DiffIR/train_pipeline.py", line 185, in train_pipeline
model.optimize_parameters(current_iter)
File "/DiffIR/DiffIR-RealSR/DiffIR/models/DiffIR_S2_model.py", line 408, in optimize_parameters
_, pred_IPR_list = self.net_g.module.diffusion(self.lq,S1_IPR[0])
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1207, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'DiffIRS2' object has no attribute 'module'

多卡训练时会有module这个属性,是必须使用多卡训练吗?

@Zj-BinXia
Copy link
Owner

You can change _, pred_IPR_list = self.net_g.module.diffusion(self.lq,S1_IPR[0]) to _, pred_IPR_list = self.net_g.diffusion(self.lq,S1_IPR[0])

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