efishSignalDetector/custom_utils.py

6 lines
204 B
Python

def collate_fn(batch):
"""
To handle the data loading as different images may have different number
of objects and to handle varying size tensors as well.
"""
return tuple(zip(*batch))