Closed youmi-zym closed 5 years ago
Hi: I find there are some images' disparity of SceneFlow are bigger than maxdisp,
mask = disp_true < args.maxdisp mask.detach_()
mask is all zero here, there will be a error when calculating loss, and it can't be backward.
An example:
The code will run well with batch-size bigger than 1, but batch-size=1 will lead this bug
my advice is before model forward, check wether mask is all 0:
mask = (disp_true < args.max_disp) mask = mask.detach().type_as(disp_true) if mask.sum() < 1.0: continue
Hi, @youmi-zym Thank you. I will modified it.
Hi: I find there are some images' disparity of SceneFlow are bigger than maxdisp,
mask is all zero here, there will be a error when calculating loss, and it can't be backward.
An example:
The code will run well with batch-size bigger than 1, but batch-size=1 will lead this bug
my advice is before model forward, check wether mask is all 0: