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

Problem with vid_demo.py with cpu #91

Open
wz7475 opened this issue Aug 2, 2024 · 1 comment
Open

Problem with vid_demo.py with cpu #91

wz7475 opened this issue Aug 2, 2024 · 1 comment

Comments

@wz7475
Copy link

wz7475 commented Aug 2, 2024

device: intel x86_64; os: ubuntu 20.04; gpu: none

python tools/vid_demo.py -f exps/yolov++/v++_SwinTiny_decoupleReg.py -c weights/v++_swinTiny.pth  --path car-detection.mp4 --conf 0.25 --nms 0.5 --tsize 576 --save_result results --device cpu 


Traceback (most recent call last):
  File "tools/vid_demo.py", line 301, in <module>
    main(exp, args)
  File "tools/vid_demo.py", line 292, in main
    imageflow_demo(predictor, vis_folder, current_time, args,exp)
  File "tools/vid_demo.py", line 206, in imageflow_demo
    outputs.extend(predictor.inference(ele,lframe=lframe,gframe=gframe))
  File "/root/yolov/tools/val_to_imdb.py", line 147, in inference
    outputs,outputs_ori = self.model(img,lframe=lframe,gframe=gframe)
  File "/root/miniforge3/envs/yolov/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/yolov/yolox/models/yolov_plus.py", line 21, in forward
    fpn_outs = self.backbone(x)
  File "/root/miniforge3/envs/yolov/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/yolov/yolox/models/yolo_pafpn.py", line 215, in forward
    out_features = self.backbone(input)
  File "/root/miniforge3/envs/yolov/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/yolov/yolox/models/swin_transfomer.py", line 608, in forward
    x = self.patch_embed(x)
  File "/root/miniforge3/envs/yolov/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/yolov/yolox/models/swin_transfomer.py", line 448, in forward
    x = self.proj(x)  # B C Wh Ww
  File "/root/miniforge3/envs/yolov/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/miniforge3/envs/yolov/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 463, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "/root/miniforge3/envs/yolov/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 460, in _conv_forward
    self.padding, self.dilation, self.groups)
RuntimeError: Input type (float) and bias type (c10::Half) should be the same
@KozlovKY
Copy link

KozlovKY commented Aug 7, 2024

same error occurred

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

2 participants