Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Utility functions have been defined for re-creating these architectures (with or
from nnunet_mednext import create_mednext_v1

model = create_mednext_v1(
num_channels = 3,
num_input_channels = 3,
num_classes = 10,
model_id = 'B', # S, B, M and L are valid model ids
kernel_size = 3, # 3x3x3 and 5x5x5 were tested in publication
Expand Down Expand Up @@ -228,4 +228,4 @@ mednextv1_train 3d_fullres nnUNetTrainerV2_MedNeXt_S_kernel5 Task040_KiTS2019 0
The `-resample_weights` flag as it is responsible to triggering the UpKern algorithm.

### A note on 2D MedNeXt:
Please note that while the MedNeXt can run on 2D, it has not been tested in 2D mode.
Please note that while the MedNeXt can run on 2D, it has not been tested in 2D mode.
2 changes: 1 addition & 1 deletion nnunet_mednext/training/model_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def load_model_and_checkpoint_files(folder, folds=None, mixed_precision=None, ch
trainer.initialize(False)
all_best_model_files = [join(i, "%s.model" % checkpoint_name) for i in folds]
print("using the following model files: ", all_best_model_files)
all_params = [torch.load(i, map_location=torch.device('cpu')) for i in all_best_model_files]
all_params = [torch.load(i, map_location=torch.device('cpu'), weights_only=False) for i in all_best_model_files]
return trainer, all_params


Expand Down