Skip to content

Commit b1df4eb

Browse files
authored
Update predict_from_raw_data.py
Error from RuntimeError: Inplace update to inference tensor outside InferenceMode is not allowed.You can make a clone to get a normal tensor before doing inplace update.See pytorch/rfcs#17 for more details
1 parent 8fd3580 commit b1df4eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nnunetv2/inference/predict_from_raw_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def predict_logits_from_preprocessed_data(self, data: torch.Tensor) -> torch.Ten
491491
if prediction is None:
492492
prediction = self.predict_sliding_window_return_logits(data).to('cpu')
493493
else:
494-
prediction += self.predict_sliding_window_return_logits(data).to('cpu')
494+
prediction = prediction + self.predict_sliding_window_return_logits(data).to('cpu')
495495

496496
if len(self.list_of_parameters) > 1:
497497
prediction /= len(self.list_of_parameters)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy