You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In normal cases, mask.nonzero().squeeze() squeezes out the non zero terms in mask, which makes box is of the same shape as box_preds(2d tensor).
However, when there is only one True element in mask, box turns out to be a 1d tensor, which leads to dimension mismatch error in the lines below.
torchcv/torchcv/models/ssd/box_coder.py
Line 119 in 2ee9c46
In normal cases,
mask.nonzero().squeeze()
squeezes out the non zero terms inmask
, which makesbox
is of the same shape asbox_preds
(2d tensor).However, when there is only one
True
element inmask
,box
turns out to be a 1d tensor, which leads to dimension mismatch error in the lines below.torchcv/torchcv/utils/box.py
Lines 102 to 105 in 6291f3e
I suggest to modify the mask operation like this below:
The text was updated successfully, but these errors were encountered: