Skip to content

Commit 3df680c

Browse files
committed
fix #2520
1 parent 43349fa commit 3df680c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nnunetv2/inference/predict_from_raw_data.py

+4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ def initialize_from_trained_model_folder(self, model_training_output_dir: str,
112112
self.configuration_manager = configuration_manager
113113
self.list_of_parameters = parameters
114114
self.network = network
115+
116+
# initialize network with first set of parameters, also see https://github.com/MIC-DKFZ/nnUNet/issues/2520
117+
network.load_state_dict(parameters[0])
118+
115119
self.dataset_json = dataset_json
116120
self.trainer_name = trainer_name
117121
self.allowed_mirroring_axes = inference_allowed_mirroring_axes

0 commit comments

Comments
 (0)