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

这里面的pytorch模型如何使用bf16进行推理呢 #83

Open
LY000001 opened this issue Jan 15, 2024 · 0 comments
Open

这里面的pytorch模型如何使用bf16进行推理呢 #83

LY000001 opened this issue Jan 15, 2024 · 0 comments

Comments

@LY000001
Copy link

作者,你好!我使用./PaddleOCR2Pytorch/tools/infer/predict_rec.py 进行推理,我把模型和数据转换成bfloat16后报一下错误,Traceback (most recent call last):
File "./PaddleOCR2Pytorch/tools/infer/predict_rec.py", line 169, in
main(utility.parse_args())
File "./PaddleOCR2Pytorch/tools/infer/predict_rec.py", line 155, in main
rec_res, predict_time = text_recognizer(img_list)
File "./PaddleOCR2Pytorch/tools/infer/predict_rec.py", line 122, in call
prob_out = self.net(inp)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/root/PaddleOCR2Pytorch/pytorchocr/modeling/architectures/base_model.py", line 94, in forward
x = self.backbone(x)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/root/PaddleOCR2Pytorch/pytorchocr/modeling/backbones/rec_mv1_enhance.py", line 198, in forward
y = self.conv1(inputs)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/root/PaddleOCR2Pytorch/pytorchocr/modeling/backbones/rec_mv1_enhance.py", line 36, in forward
y = self._conv(inputs)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/conv.py", line 460, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/opt/rh/rh-python38/root/usr/local/lib64/python3.8/site-packages/torch/nn/modules/conv.py", line 456, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: could not create a primitive descriptor for a convolution forward propagation primitive

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