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
Traceback (most recent call last):
File "/home/meichen/SourceProject/Person-reid-GAN-pytorch-master/train_baseline.py", line 178, in
dataloaders['train'] = DataLoader(dcganDataset('train_new',data_transforms['train']), batch_size=opt.batchsize,
File "/home/meichen/SourceProject/Person-reid-GAN-pytorch-master/train_baseline.py", line 115, in init
self.img_label.append(int(folder))
ValueError: invalid literal for int() with base 10: ' gen_0000'
对应错的错误位置是dcgandata类,如下:
if root=='train_new' :
for folder in os.listdir(self.image_dir):
fdir=self.image_dir+'/'+folder # folder gen_0000 means the images are generated images, so their flags are 1
if folder == 'gen_0000':
for files in os.listdir(fdir):
temp=folder+'_'+files
self.img_label.append(int(folder[-4:]))
self.img_flag.append(1)
self.samples.append(temp)
else:
for files in os.listdir(fdir):
temp=folder+'_'+files
self.img_label.append(int(folder)) #**提示这一行是有问题的**
self.img_flag.append(0)
self.samples.append(temp)
实在是没有想明白,跪求解答!
The text was updated successfully, but these errors were encountered:
你好,感谢你的分享!有一个问题想向你请教~我已经通过DCGAN生成图像并且放到train_new中,如下图所示:
生成图像的索引如下:
但是在跑train_baseline的时候,却出现了下面的错误,
对应错的错误位置是dcgandata类,如下:
实在是没有想明白,跪求解答!
The text was updated successfully, but these errors were encountered: