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

RuntimeError: "upsample_nearest2d_channels_last" not implemented for 'Half' #35

Open
charley12009 opened this issue Feb 24, 2024 · 0 comments

Comments

@charley12009
Copy link

charley12009 commented Feb 24, 2024

我上網查了,好像跟torch版本有關,但現在只能裝2.x版而已,請問一下該如何解決?
Traceback (most recent call last):
File "c:\yolov5_deepsort_infer\Yolov5-deepsort-inference\demo.py", line 58, in
main()
File "c:\yolov5_deepsort_infer\Yolov5-deepsort-inference\demo.py", line 32, in main
result = det.feedCap(im, func_status)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\yolov5_deepsort_infer\Yolov5-deepsort-inference\utils\BaseDetector.py", line 35, in feedCap
im, faces, face_bboxes = update_tracker(self, im)
^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\yolov5_deepsort_infer\Yolov5-deepsort-inference\tracker.py", line 42, in update_tracker
_, bboxes = target_detector.detect(image)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\yolov5_deepsort_infer\Yolov5-deepsort-inference\AIDetector_pytorch.py", line 47, in detect
pred = self.m(img, augment=False)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\yolov5_deepsort_infer\yolov5_infer\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\yolov5_deepsort_infer\yolov5_infer\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\yolov5_deepsort_infer\Yolov5-deepsort-inference\models\yolo.py", line 112, in forward
return self.forward_once(x, profile) # single-scale inference, train
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\yolov5_deepsort_infer\Yolov5-deepsort-inference\models\yolo.py", line 128, in forward_once
x = m(x) # run
^^^^
File "C:\yolov5_deepsort_infer\yolov5_infer\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\yolov5_deepsort_infer\yolov5_infer\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\yolov5_deepsort_infer\yolov5_infer\Lib\site-packages\torch\nn\modules\upsampling.py", line 157, in forward
return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\yolov5_deepsort_infer\yolov5_infer\Lib\site-packages\torch\nn\functional.py", line 4001, in interpolate
return torch._C._nn.upsample_nearest2d(input, output_size, scale_factors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: "upsample_nearest2d_channels_last" not implemented for 'Half'

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

No branches or pull requests

1 participant