-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShuffleBuffer not returning all patches #7986
Comments
I am having the same issue. |
@CH4LLENG3R I believe I discovered the source of the problem, or at least a workaround, in my setup. I was passing the ShuffleBuffer to a DataLoader with |
Thank you @DylanHsu, your solution works! |
Describe the bug
While following the tutorial https://github.com/Project-MONAI/tutorials/blob/main/modules/2d_slices_from_3d_training.ipynb and implementing parts of it to my project especially when it comes to transforming Dataset containing 3D to 2D patches I encountered an issue with ShuffleBuffer.
`def create_dataset_2D_ds(ds, keys: list, trans2d: list) -> monai.data.ShuffleBuffer:
# ds = CacheDataset(data=data_dicts, transform=transforms)
patch_func = monai.data.PatchIterd(
keys=keys, patch_size=(None, None, 1), start_pos=(0, 0, 0)
)
The problem is described above in the comments, I know that the GridPatchDataset contains 531 entries, but using ShuffleBuffer in DataLoader will result in 133.
Expected behavior
Being able to Iterate with ShuffleBuffer through entire GridPatchDataset
The text was updated successfully, but these errors were encountered: