We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for idx_iter, (img, gt_mask, size, _) in enumerate(test_loader): img = Variable(img).cuda() pred = net.forward(img) pred = pred[:,:,:size[0],:size[1]] gt_mask = gt_mask[:,:,:size[0],:size[1]] eval_mIoU.update((pred>opt.threshold).cpu(), gt_mask) eval_PD_FA.update((pred[0,0,:,:]>opt.threshold).cpu(), gt_mask[0,0,:,:], size)
这段循环之前没有类似test.py之中的with torch.no_grad():是不是此处出现了BUG
The text was updated successfully, but these errors were encountered:
需要加上with torch.no_grad():,同时参考#issues32
Sorry, something went wrong.
No branches or pull requests
这段循环之前没有类似test.py之中的with torch.no_grad():是不是此处出现了BUG
The text was updated successfully, but these errors were encountered: