Skip to content
Discussion options

You must be logged in to vote

@wyli thank you for the response. I think the issue is actually with ZipDataset (not having Randomizable?). Using the default worker_init_fn does not change the results, but using just ImageDataset resolves the issue. Here is a reproducible version:

from monai.transforms import RandGaussianSmooth,  AddChannel, RandSpatialCrop, Compose, ScaleIntensity, EnsureType
import pdb
import monai
from monai.data import ImageDataset, Dataset, ArrayDataset, ZipDataset, DataLoader
import scipy
import numpy as np
import torch
import torchvision.transforms as transforms
import nibabel as nib
from monai.data.utils import worker_init_fn
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wyli
Comment options

wyli Aug 24, 2022
Collaborator

Answer selected by wyli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants