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

GPU tensor to int conversion bugs #148

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

GPU tensor to int conversion bugs #148

wants to merge 3 commits into from

Conversation

tensorturtle
Copy link

@tensorturtle tensorturtle commented Jan 19, 2021

Fixes #147 and related bugs.
Issue #147 happens because when running on GPU, some tensors are moved to GPU while others are still in CPU. This becomes a problem in /vision/utils/box_utils.py, when an operation tries to work on tensors that are in different places.
I fixed another bug which happened because OpenCV's cv2.rectangle does not accept tensors as arguments. I fixed it by getting the python numerical value of the tensor with .item() and converting it to int.

@tensorturtle tensorturtle changed the title fix tensor to int conversion bug and tensor location bug fixes #147 tensor to int conversion bugs Jan 19, 2021
@tensorturtle tensorturtle changed the title fixes #147 tensor to int conversion bugs GPU tensor to int conversion bugs Jan 19, 2021
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.

cannot run run_ssd_example.py on cuda
1 participant