Closed joel1895 closed 3 years ago
Maybe you run the wrong script. Please use ACGPN_train/train.py
Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 125, in _main prepare(preparation_data) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 237, in prepare _fixup_main_from_path(data['init_main_from_path']) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 288, in _fixup_main_from_path main_content = runpy.run_path(main_path, File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 268, in run_path return _run_module_code(code, init_globals, run_name, File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 97, in _run_module_code _run_code(code, mod_globals, init_globals, File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\ACGPN-master\train.py", line 143, in <module> losses, fake_image, real_image,input_label,L1_loss,style_loss,clothes_mask,warped,refined,CE_loss,rx,ry,cx,cy,rg,cg= model(Variable(data['label'].cuda()),Variable(data['edge'].cuda()),Variable(img_fore.cuda()),Variable(mask_clothes.cuda()),Variable(data['color'].cuda()),Variable(all_clothes_label.cuda()),Variable(data['image'].cuda()),Variable(data['pose'].cuda()),Variable(data['mask'].cuda()) ) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\parallel\data_parallel.py", line 166, in forward return self.module(*inputs[0], **kwargs[0]) File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) TypeError: forward() missing 1 required positional argument: 'mask_fore'
I think I have the same problem. If mask_fore is added, the error variable does not match and the current file is used.
windows 10 Pytorch -1.9.0+cu111 TorchVision - 0.10.0+cu111 python -3.9 Pillow -8.2.0
I'm having same issue here.
losses, fake_image, real_image,input_label,L1_loss,style_loss,clothes_mask,warped,refined,CE_loss,rx,ry,cx,cy,rg,cg
@LZQhardworker May I ask you where each variable comes from? ex) clothes_mask, warped, refined comes from Variable(data['mask'].cuda()
losses, fake_image, real_image, input_label, L1_loss, style_loss, clothes_mask, warped, refined, CE_loss, rx, ry, cx, cy, rg, cg = model(Variable(data['label'].cuda()), Variable(data['edge'].cuda()), Variable( img_fore.cuda()), Variable(mask_clothes.cuda()), Variable(data['color'].cuda()), Variable(all_clothes_label.cuda()), Variable(data['image'].cuda()), Variable(data['pose'].cuda()), Variable(data['mask'].cuda()),mask_fore)
This is the code of trainining, while the model returns only 10 values, in the repo 16 variables are assigned to catch the return values of model, because of which its throwing error, why extra 6 variables has been assigned?
I am not even sure how you trained your model, values of losses are initialized to zero without even using the discrimantor. can you please provide the orginial train.py? with the current file, its not possible to train the model.