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

Update seg_to_regions.py #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mansourhas
Copy link

fix error message isin() received an invalid combination of arguments - got (Tensor, tuple),

fix error message ` isin() received an invalid combination of arguments - got (Tensor, tuple), `
@mansourhas
Copy link
Author

this issue happens when I'm using CPU, but now, I'm running from a different environment and got a warning..

UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). region_output[:, region_id] |= torch.isin(segmentation[:, self.channel_in_seg], torch.tensor(region_labels).to(segmentation.dtype))

which might suggest the issue that the region_labels is a tuble only happens when using CPU?

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

Successfully merging this pull request may close these issues.

1 participant