You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: