-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Training nnUNetv2 Key Error: 'conv_kernel_sizes' #2322
Comments
It maybe because of the version of nnunetv2. |
Please update to the latest version and rerun nnUNetv2_plan_and_preprocess. Then try again |
I had the same error for a completely different yet similar reason, but in a trickier sort of way. It didn't occur during training, but in prediction after training was complete. The situation is that I had been running training on a AWS cloud instance, and was downloading the result to run predictions on my local computer. While setting up the cloud instance, I was installing nnUNetv2 fresh, but on the local computer I was using nnUNetv2 installed almost a year ago. After the first training run, I was able to run predictions locally with the older copy of the nnUNetv2 code from last year. But after the second training run, I was getting the above error. The sole change between the two training runs is that I ran the first one with fold=all, and the second one with 5-fold cross-validation. After I created a new local env with a freshly installed nnUNetv2 on my computer, prediction on the 5-fold validation trained models now worked. |
I encountered the following error while trying to train the model
nnUNetv2_train DATASET_ID 3d_fullres 0
:../nunetv2/utilities/plans_handling/plans_handler.py", line 116, in conv_kernel_sizes
return self.configuration['conv_kernel_sizes']
KeyError: 'conv_kernel_sizes'
nnUNetv2_plan_and_preprocess -d DATASET_ID
was successfuly completed and nnUNetPlans.json file is present in the nnUNet_preprocessed folder containing different configurations.There is a key kernel_sizes in nnUnetPlans.json file, but there is no key conv_kernel_sizes.
The following keys are present in the configuration file that is being processed by plans_handler.py:
data_identifier
preprocessor_name
batch_size
patch_size
median_image_size_in_voxels
spacing
normalization_schemes
use_mask_for_norm
resampling_fn_data
resampling_fn_seg
resampling_fn_data_kwargs
resampling_fn_seg_kwargs
resampling_fn_probabilities
resampling_fn_probabilities_kwargs
architecture
batch_dice
The text was updated successfully, but these errors were encountered: