|
【人工智能】
AIO 3399PRO 官方例程(onnx, pth)跑不起来
发表于 2020-10-29 14:29:52
浏览:6140
|
回复:1
打印
只看该作者
[复制链接]
楼主
环境: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!
|
|