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

MetaTensor size bug in transform function #5414

Closed
chuxiang93 opened this issue Oct 27, 2022 · 1 comment · Fixed by #5415
Closed

MetaTensor size bug in transform function #5414

chuxiang93 opened this issue Oct 27, 2022 · 1 comment · Fixed by #5415
Labels
bug Something isn't working

Comments

@chuxiang93
Copy link

Since SIZE is a function of the class metatensor, this sentence does not work. The correct way should be "fg_indices.size()[0]".

pos_ratio = 0 if fg_indices.size == 0 else 1

wyli added a commit to wyli/MONAI that referenced this issue Oct 27, 2022
Signed-off-by: Wenqi Li <[email protected]>
wyli added a commit to wyli/MONAI that referenced this issue Oct 27, 2022
Signed-off-by: Wenqi Li <[email protected]>
wyli added a commit to wyli/MONAI that referenced this issue Oct 27, 2022
Signed-off-by: Wenqi Li <[email protected]>
@wyli
Copy link
Contributor

wyli commented Oct 27, 2022

thanks for reporting, I'm submitting a patch #5415

wyli added a commit that referenced this issue Oct 27, 2022
Signed-off-by: Wenqi Li <[email protected]>

Fixes #5414



### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [x] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: Wenqi Li <[email protected]>
@wyli wyli added the bug Something isn't working label Oct 27, 2022
KumoLiu pushed a commit that referenced this issue Nov 2, 2022
Signed-off-by: Wenqi Li <[email protected]>

Fixes #5414



### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [x] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: KumoLiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants