Skip to content

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