Skip to content

Dataloader default collate_fn not working with square cutouts #23

@mb010

Description

@mb010

The dataloader default collate_fn not working with square cutouts. It is unclear why this is happening. The error is:

 File "/opt/miniconda3/envs/astronavit/lib/python3.11/site-packages/torch/utils/data/_utils/collate.py", line 220, in collate_numpy_array_fn
    raise TypeError(default_collate_err_msg_format.format(elem.dtype))
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found object

This might be solved by having target specific transforms which are applied to the target object, constraining it to be a torch tensor, but I didn't have time to check. The current plan is to write a collate_fn which is slightly more dynamic to catch this edge case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions