We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
MONAI/monai/transforms/post/array.py
Lines 628 to 636 in 825b8db
the current implementation keeps all the predictions which take up unnecessary space compared with maintaining an output and updating it in-place.
The text was updated successfully, but these errors were encountered:
Hello @wyli ,
I have tried to implement a method using a single output and updating it in-place. Here's the code:
for i, pred in enumerate(img): pred = torch.as_tensor(pred) if out_pt is None: out_pt = torch.zeros_like(pred) if self.weights is not None: weight = self.weights[i].to(pred.device) out_pt += pred * weight total_weight += weight out_pt /= total_weight
What do you think about it?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
MONAI/monai/transforms/post/array.py
Lines 628 to 636 in 825b8db
the current implementation keeps all the predictions which take up unnecessary space compared with maintaining an output and updating it in-place.
The text was updated successfully, but these errors were encountered: