Skip to content

Commit

Permalink
fix #2520
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianIsensee committed Jan 7, 2025
1 parent 43349fa commit 3df680c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nnunetv2/inference/predict_from_raw_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def initialize_from_trained_model_folder(self, model_training_output_dir: str,
self.configuration_manager = configuration_manager
self.list_of_parameters = parameters
self.network = network

# initialize network with first set of parameters, also see https://github.com/MIC-DKFZ/nnUNet/issues/2520
network.load_state_dict(parameters[0])

self.dataset_json = dataset_json
self.trainer_name = trainer_name
self.allowed_mirroring_axes = inference_allowed_mirroring_axes
Expand Down

0 comments on commit 3df680c

Please sign in to comment.