For anyone experiencing this error it probably has to do with collate_fn returning a list/tuple of tensors. This is explained further in an open issue 79.
Consider packing your data by padding it and then stacking it. You do however need to keep track of the amount of padding applied to each data entry when unpacking.
My problem was passing variable number of targets for each image. The only difference between targets were  how many rows they had. So I stacked them by prepending the batch index to each row first. My code looks something like:
    def my_collate(batch):
        targets = ...
        for i in range(len(targets)):
            if len(targets[i]) > 0:
                # Some images have no targets so we need
               # this check before attempting to prepend the batch index.
                targets[i] = torch.cat(
                    [
                        i * torch.ones(targets[i].size(0), 1),
                        targets[i],
                    ],
                    dim = -1
                )
        targets = torch.cat(targets, dim=0)
        return ...