|
板凳
楼主 |
发表于 2022-3-24 11:50:51
|
只看该作者
完整的错误信息是
- root@e0ded6759c5b:/examples/pytorch/yolov5# python test.py
- --> Config model
- done
- --> Loading model
- yolov5s.torchscript.pt ********************
- E Catch exception when loading pytorch model: yolov5s.torchscript.pt!
- E Traceback (most recent call last):
- E File "rknn/api/rknn_base.py", line 376, in rknn.api.rknn_base.RKNNBase.load_pytorch
- E File "rknn/base/RKNNlib/RK_nn.py", line 157, in rknn.base.RKNNlib.RK_nn.RKnn.load_pytorch
- E File "rknn/base/RKNNlib/app/importer/import_pytorch.py", line 129, in rknn.base.RKNNlib.app.importer.import_pytorch.ImportPytorch.run
- E File "rknn/base/RKNNlib/converter/convert_pytorch_new.py", line 3971, in rknn.base.RKNNlib.converter.convert_pytorch_new.convert_pytorch.load
- E File "/usr/local/lib/python3.6/dist-packages/torch/jit/__init__.py", line 275, in load
- E cpp_module = torch._C.import_ir_module(cu, f, map_location, _extra_files)
- E RuntimeError:
- E aten::_convolution(Tensor input, Tensor weight, Tensor? bias, int[] stride, int[] padding, int[] dilation, bool transposed, int[] output_padding, int groups, bool benchmark, bool deterministic, bool cudnn_enabled) -> (Tensor):
- E Expected at most 12 arguments but found 13 positional arguments.
- E :
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/conv.py(440): _conv_forward
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/conv.py(443): forward
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/module.py(1039): _slow_forward
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/module.py(1051): _call_impl
- E /home/bertha/Desktop/1/yolov5-6.0/models/common.py(48): forward_fuse
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/module.py(1039): _slow_forward
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/module.py(1051): _call_impl
- E /home/bertha/Desktop/1/yolov5-6.0/models/yolo.py(156): _forward_once
- E /home/bertha/Desktop/1/yolov5-6.0/models/yolo.py(133): forward
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/module.py(1039): _slow_forward
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/module.py(1051): _call_impl
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/jit/_trace.py(959): trace_module
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/jit/_trace.py(744): trace
- E export.py(56): export_torchscript
- E export.py(304): run
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/autograd/grad_mode.py(28): decorate_context
- E export.py(359): main
- E export.py(364): <module>
- E Serialized File "code/__torch__/torch/nn/modules/conv.py", line 11
- E x: Tensor) -> Tensor:
- E _0 = self.bias
- E x0 = torch._convolution(x, self.weight, _0, [2, 2], [2, 2], [1, 1], False, [0, 0], 1, False, False, True, True)
- E ~~~~~~~~~~~~~~~~~~ <--- HERE
- E return x0
- E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
- E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
- Load yolov5 failed!
有一个理解不了的地方是 为什么docker中运行程序 报错信息中会出现主机中的conda环境,
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/module.py(1039): _slow_forward
- E /home/bertha/anaconda3/envs/rknny5v5/lib/python3.6/site-packages/torch/nn/modules/module.py(1051): _call_impl
甚至会报出关于yolov5的代码部分
- E /home/bertha/Desktop/1/yolov5-6.0/models/yolo.py(133): forward
我理解docker应该是一个独立的环境呀 是我哪里操作有问题吗
求帮助 谢谢 |
|