pytorch-ssd
pytorch-ssd copied to clipboard
GPU tensor to int conversion bugs
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.