How should monai.data.DataLoader() be passed to training iterator? #4551
Unanswered
relyativist
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
#4545
From my issue I found that every get_item method of monai.data.DataLoader() call generates random transform. However, I
am bit confised how should
monai.data.DataLoader()
be passed in training loop as enumerate object to get same transformation for 'seg' and 'image'?I create input dataloader with folowwing steps:
data = {'image': ['/tmp/sub-1/sub-1_t1.nii.gz', '/tmp/sub-t2.nii.gz'], 'seg': '/tmp/1.nii.gz'}
When I pass
train_loader
in one_epoch and print it with:print(brain_tensor.shape, label_tensor.shape)
I got the dimension equal totorch.Size([2, 3, 128, 128, 128]) torch.Size([2, 1, 128, 128, 128])
Does it right way to load it to iterator?
Beta Was this translation helpful? Give feedback.
All reactions