Hello,I am preparing dataset for a detection task:
def __getitem__(self, idx): ...... return from_numpy(image), from_numpy(bboxes)
As you can see,the second element of the return is bboxes,and different image will have different number of objects in it,so the shape of the bboxes will vary from each other,and this will cause Dataloder throws out an exception like:
RuntimeError: stack expects each tensor to be equal size, but got [1, 1, 5] at entry 0 and [1, 5, 5] at entry 1
when it tries to stack bboxes(label) in a batch,question is
what is general paradigm to handle this issue?