CelebAMask-HQ
CelebAMask-HQ copied to clipboard
IndexError: index 7 is out of bounds for dimension 0 with size 7
During training, after 3080 step, in the following loop in "trainer.py"
# image infor on tensorboardX
img_combine = imgs[0]
real_combine = label_batch_real[0]
predict_combine = label_batch_predict[0]
for i in range(1, self.batch_size):
**img_combine = torch.cat([img_combine, imgs[i]], 2)**
real_combine = torch.cat([real_combine, label_batch_real[i]], 2)
predict_combine = torch.cat([predict_combine, label_batch_predict[i]], 2)
writer.add_image('imresult/img', (img_combine.data + 1) / 2.0, step)
writer.add_image('imresult/real', real_combine, step)
writer.add_image('imresult/predict', predict_combine, step)
Im getting the below error.
"IndexError: index 7 is out of bounds for dimension 0 with size 7"
Please help me in this regard
Thanks
Hey, @ssbilakeri , have you figured out how to solve this problem ?
@ssbilakeri All these "writer" related stuff seems being used in tensorboard. So, if u don't need tensorboard to show some results, those "writer" related codes can be removed.