Skip to content
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

Inference doesn't work on CPU #2193

Open
davidkflau opened this issue May 16, 2024 · 3 comments
Open

Inference doesn't work on CPU #2193

davidkflau opened this issue May 16, 2024 · 3 comments
Assignees

Comments

@davidkflau
Copy link

Hi, I tried to run the inference on the CPU but got the below error.

 File "\inference\predict_from_raw_data.py", line 494, in predict_logits_from_preprocessed_data
    prediction += self.predict_sliding_window_return_logits(data).to('cpu')
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 https://github.com/pytorch/rfcs/pull/17 for more details.
@mdeleeuw1
Copy link

Same happens to me, but only when trying to perform inference using more than 1 fold.

@ykirchhoff
Copy link
Contributor

Hi @davidkflau, @mdeleeuw1,

CPU inference should usually work fine, but might be that some changes broke something somewhere...
Let me check if I can reproduce your issue and get back to you.

Best,
Yannick

@abhisuri97
Copy link

Also ran into the same error. using nnunetv2≥2.2.1, torch≥2.0.0 and python ≥ 3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants