Unet_pytorch icon indicating copy to clipboard operation
Unet_pytorch copied to clipboard

Test data extracted from training dataset?

Open ProNoobLi opened this issue 6 years ago • 1 comments

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

ProNoobLi avatar Jun 25 '18 19:06 ProNoobLi

@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.

jakeoung avatar Jul 26 '18 22:07 jakeoung