-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When collate dtype, GDSDataset will cause error.
Traceback (most recent call last):
File "/home/lab/yliu/MONAI/monai/data/utils.py", line 489, in list_data_collate
ret[key] = collate_meta_tensor(data_for_batch)
File "/home/lab/yliu/MONAI/monai/data/utils.py", line 460, in collate_meta_tensor
return {k: collate_meta_tensor([d[k] for d in batch]) for k in elem_0}
File "/home/lab/yliu/MONAI/monai/data/utils.py", line 460, in <dictcomp>
return {k: collate_meta_tensor([d[k] for d in batch]) for k in elem_0}
File "/home/lab/yliu/MONAI/monai/data/utils.py", line 465, in collate_meta_tensor
return default_collate(batch)
File "/home/lab/anaconda3/envs/gds_env/lib/python3.10/site-packages/torch/utils/data/_utils/collate.py", line 265, in default_collate
return collate(batch, collate_fn_map=default_collate_fn_map)
File "/home/lab/anaconda3/envs/gds_env/lib/python3.10/site-packages/torch/utils/data/_utils/collate.py", line 150, in collate
raise TypeError(default_collate_err_msg_format.format(elem_type))
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'numpy.dtypes.Float32DType'>
To Reproduce
run https://github.com/Project-MONAI/tutorials/blob/main/modules/GDS_dataset.ipynb
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working