Unet_pytorch
Unet_pytorch copied to clipboard
Test data extracted from training dataset?
Hi, Jakeoung I am running your code and everything is fine. But I am wondering that why do you use figures from training dataset to do prediction in the main.py?
for i, (x,y) in enumerate(train_loader): if i >= 11: break
y_pred = model(Variable(x)) showImg(x.numpy(), binary=False, fName='ori_'+str(i)) showImg(y_pred.data.numpy(), binary=False, fName='pred_'+str(i)) showImg(y.numpy(), fName='gt_'+str(i))
Predicting the data which has already trained by U-net is 'cheating'.... Is there something wrong with my understanding?
Thanks for your time
@JiayuanSternLi Oh, I apologize for my dirty code. It was my first trial to use pytorch and I was newbie in deep learning at that time. Yes, it should predict a test image, not training image. Your understanding is correct, I think.