DataLoader gives:stack expects each tensor to be equal size,due to different image has different objects number

Ok, so I have a function:

def collate_fn(data):
    img, bbox = data
    zipped = zip(img, bbox)
    return zipped

Where data is object of class based on Dataset like:


def getitem(self, idx):
img = self.imgs[idx]
bbox = self.bboxs[idx]
return (
img,
bbox,
)

And how I am supposed to use it?
When I do like this:

my_loader = DataLoader(data, batch_size=8, shuffle=True, collate_fn=collate_fn(data))

there is an error that: zip object is not callable

What am I doing wrong?