You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the entire repo but still couldn't find the solution for the above error.
Any solution for this ? File "train.py", line 168, in <module> loss_dict = dict(zip(model.module.loss_names, losses)) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 772, in __getattr__ type(self).__name__, name)) torch.nn.modules.module.ModuleAttributeError: 'Pix2PixHDModel' object has no attribute 'module'
The text was updated successfully, but these errors were encountered:
@daxjain789 , I didn't check the train.py in this repository, only ran the test.py, hence I am not sure what's causing it. You may refer to the original repository of acgpn for the train scripts.
This will solve the issue, after model.initialize(), add the below code .Here,the model is wrapped around the DataParallel and the 'module' attribute is coming from here. model = torch.nn.DataParallel(model, device_ids=[0]) #0 because of only 1 GPU, add [0,1,2,3] if you have multiple GPUs
I have searched the entire repo but still couldn't find the solution for the above error.
Any solution for this ?
File "train.py", line 168, in <module> loss_dict = dict(zip(model.module.loss_names, losses)) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 772, in __getattr__ type(self).__name__, name)) torch.nn.modules.module.ModuleAttributeError: 'Pix2PixHDModel' object has no attribute 'module'
The text was updated successfully, but these errors were encountered: