Closed mayankcstech closed 4 years ago
Which Pytorch Version you are using?
Hi,
I am using pytorch 1.4.0 on python 3.7. Thanks!
There is no error in my side. However, the type of the data was converted to float16 from float32 to speed up the execution time. If you are still facing the issue change torch.half to torch.float in line 104. Kindly let me know if it solves your issue.
Hi
I have just started implementing it. Trying to run the code "object_detection.py" for a video. I am able to read the video, resize it, as is inside the code. Although I am getting the following error:
Traceback (most recent call last): File "object_detection.py", line 141, in <module> ObjectDetection(id).main() File "object_detection.py", line 110, in main output[:,1:5] = torch.clamp(output[:,1:5], 0.0, float(self.inp_dim))/self.inp_dim RuntimeError: "clamp_cpu" not implemented for 'Half'
When I commented out the line
output = output.type(torch.half)
it works and does detection. But I am not sure if that's the right way to resolve the error. Please guide as what would be the issue. Thanks!