fuzeqiang 发表于 2020-10-29 14:29:52

AIO 3399PRO 官方例程(onnx, pth)跑不起来

环境:ubuntu18.04          rknn_toolkit-1.3.0-cp36-cp36m-linux_aarch64.whl
         torchvision-0.3.0-cp36-cp36m-linux_aarch64.whl
         torch-1.1.0-cp36-cp36m-linux_aarch64.whl
         tensorflow-1.10.1-cp36-cp36m-linux_aarch64.whl         
         onnx-1.4.1-cp36-cp36m-linux_aarch64.whl
         numpy 1.16

在3399上运行tensorflow模型可以转换推导成功





---------------------------------------------------------------------------------------------------



但是onnx模型有问题
官方onnx模型目录如下:
test.py
resnet50v2.onnx
README
dog_224*224.jpg
dataset.txt


问题如下:
firefly@firefly:~/rknn-toolkit/examples/resnet50v2$ python3 test.py
--> config model
done
--> Loading model
/home/firefly/.local/lib/python3.6/site-packages/onnx_tf/common/__init__.py:87: UserWarning: FrontendHandler.get_outputs_names is deprecated. It will be removed in future release.. Use node.outputs instead.
warnings.warn(message)
Killed
直接就过不了
---------------------------------------------------------------------------------------------------



但是pt模型有问题
官方pt模型目录如下:
test.py
space_shuttle_224.jpg
resnet18.pt
dataset.txt



问题如下:
firefly@firefly:~/rknn-toolkit/examples/resnet18$ python3 test.py
--> config model
done
--> Loading model
/home/firefly/.local/lib/python3.6/site-packages/onnx_tf/common/__init__.py:87: UserWarning: FrontendHandler.get_outputs_names is deprecated. It will be removed in future release.. Use node.outputs instead.
warnings.warn(message)
./resnet18.pt ********************
WARNING: Token 'COMMENT' defined, but not used
WARNING: There is 1 unused token
E Catch exception when loading pytorch model: ./resnet18.pt!
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 567, in rknn.api.rknn_base.RKNNBase.load_pytorch
E   File "rknn/base/RKNNlib/app/importer/import_pytorch.py", line 95, in rknn.base.RKNNlib.app.importer.import_pytorch.ImportPytorch.run
E   File "rknn/base/RKNNlib/converter/convert_pytorch.py", line 504, in rknn.base.RKNNlib.converter.convert_pytorch.convert_pytorch.__init__
E   File "rknn/base/RKNNlib/converter/tensor_model.py", line 419, in rknn.base.RKNNlib.converter.tensor_model.TensorModel.build_pytorch_model
E IndexError: list index out of range
Load pytorch model failed!

Gang 发表于 2020-12-29 11:21:33

rknn_toolkit-1.3.0-cp36-cp36m-linux_aarch64.whl 是哪里搞到的?我在百度网盘上下下来的文件里只有 1.4,并且还不是python3.6的
页: [1]
查看完整版本: AIO 3399PRO 官方例程(onnx, pth)跑不起来