You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the example, on the website, I have printed out the shape of patches_batch, its batch size is not the expected / specified value assigned to the data loader
Code for reproduction
# from https://torchio.readthedocs.io/patches/patch_training.html#queueimporttorchimporttorchioastiofromtorch.utils.dataimportDataLoaderpatch_size=96queue_length=300samples_per_volume=10sampler=tio.data.UniformSampler(patch_size)
subject=tio.datasets.Colin27()
subjects_dataset=tio.SubjectsDataset(10* [subject])
patches_queue=tio.Queue(
subjects_dataset,
queue_length,
samples_per_volume,
sampler,
num_workers=4,
)
patches_loader=DataLoader(
patches_queue,
batch_size=16,
num_workers=0, # this must be 0
)
num_epochs=2model=torch.nn.Identity()
forepoch_indexinrange(num_epochs):
forpatches_batchinpatches_loader:
inputs=patches_batch['t1'][tio.DATA] # key 't1' is in subjecttargets=patches_batch['brain'][tio.DATA] # key 'brain' is in subjectlogits=model(inputs) # model being an instance of torch.nn.Moduleprint(patches_batch['t1'][tio.DATA].shape, patches_batch['brain'][tio.DATA].shape)
Is there an existing issue for this?
Bug summary
From the example, on the website, I have printed out the shape of patches_batch, its batch size is not the expected / specified value assigned to the data loader
Code for reproduction
Actual outcome
(torch.Size([4, 1, 96, 96, 96]), torch.Size([4, 1, 96, 96, 96]))
Error messages
No response
Expected outcome
(torch.Size([16, 1, 96, 96, 96]), torch.Size([16, 1, 96, 96, 96]))
System info
The text was updated successfully, but these errors were encountered: