geyuying / PF-AFN

Official code for "Parser-Free Virtual Try-on via Distilling Appearance Flows", CVPR 2021.
544 stars 138 forks source link

TypeError: 'int' object is not iterable #29

Closed Zibin-Z closed 3 years ago

Zibin-Z commented 3 years ago

hi~ I'm using a single GPU to train the train_PBAFN_stage1.py, but I have this problem:TypeError: 'int' object is not iterable. What is the reason for this problem? image

geyuying commented 3 years ago

Our training code uses distributed data parallel (nn.DistributedDataParallel) in pytorch. If you want to train the model with one GPU, you need to remove DistributedDataParallel and move the model to GPU only by calling model.cuda(). You also need change the way to load data and you can refer to https://github.com/switchablenorms/DeepFashion_Try_On/blob/master/ACGPN_train/train.py