Closed kbressem closed 3 years ago
Describe the bug When using multiple inputs in a CNN, the Learner gets stuck at the start.
To Reproduce Steps to reproduce the behavior:
d = pd.read_csv('../data/radiopaedia_cases.csv') dls = ImageDataLoaders3D.from_df(d, fn_col = [0,1], size_for_resampling = (112, 112, 20), label_col = 2, # in sample data 0: series, 1: segmentation mask, 2: random binary label bs = 2, val_bs = 2 ) learn = cnn_learner_3d(dls, r3d_18, pretrained=False) learn.fine_tune(1, 0.001)
Screenshots Traceback shows that the model gets stuck at the dataloader,
Workaround until issue is fixed is to set num_workers=0, but this makes the training longer.
num_workers=0
Setting sitk.ProcessObject_SetGlobalDefaultNumberOfThreads(1) solves the issue. It is now automatically set when loading data.
sitk.ProcessObject_SetGlobalDefaultNumberOfThreads(1)
Describe the bug When using multiple inputs in a CNN, the Learner gets stuck at the start.
To Reproduce Steps to reproduce the behavior:
Screenshots Traceback shows that the model gets stuck at the dataloader,
Workaround until issue is fixed is to set
num_workers=0
, but this makes the training longer.