wx__kvi1e9
发表于 2023-2-21 11:17:50
您好,请问一下,pytorch模型要怎么样转化为RKNN模型,有没有具体的实施方法。(纯小白完全不懂)
799959745
发表于 2023-2-21 17:43:15
wx__kvi1e9 发表于 2023-2-21 11:17
您好,请问一下,pytorch模型要怎么样转化为RKNN模型,有没有具体的实施方法。(纯小白完全不懂)
看下rk相关文档吧。这方面没有深度研究过。
jieke@yiqisoft
发表于 2023-3-3 11:41:17
wx__kvi1e9 发表于 2023-2-21 11:17
您好,请问一下,pytorch模型要怎么样转化为RKNN模型,有没有具体的实施方法。(纯小白完全不懂)
用 RKNN API,就可以直接转换。参考这里的代码:https://github.com/rockchip-linux/rknn-toolkit/tree/master/examples/rknn_convert
wx__kvi1e9
发表于 2023-3-4 16:39:32
799959745 发表于 2023-2-21 17:43
看下rk相关文档吧。这方面没有深度研究过。
您好,今天在测试pytorch模型转化为RKNN模型运行时出现报错:
jiangzhaowei@ubuntu:~/work/rknn-toolkit/examples/pytorch/resnet18$ python test.py
2023-03-04 00:30:45.664500: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jiangzhaowei/.local/lib/python3.6/site-packages/cv2/../../lib:
--> config model
done
--> Loading model
./resnet18.pt ********************
E Catch exception when loading pytorch model: ./resnet18.pt!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 339, in rknn.api.rknn_base.RKNNBase.load_pytorch
E File "rknn/base/RKNNlib/RK_nn.py", line 146, in rknn.base.RKNNlib.RK_nn.RKnn.load_pytorch
E File "rknn/base/RKNNlib/app/importer/import_pytorch.py", line 128, in rknn.base.RKNNlib.app.importer.import_pytorch.ImportPytorch.run
E File "rknn/base/RKNNlib/converter/convert_pytorch_new.py", line 2250, in rknn.base.RKNNlib.converter.convert_pytorch_new.convert_pytorch.load
E File "rknn/base/RKNNlib/converter/convert_pytorch_new.py", line 2055, in rknn.base.RKNNlib.converter.convert_pytorch_new.PyTorchOpConverter.report_missing_conversion
E NotImplementedError: The following operators are not implemented: ['aten::linear']
Load pytorch model failed!
这是什么原因呢?
莫听穿林打叶声
发表于 2024-9-7 21:45:42
jieke@yiqisoft 发表于 2023-2-3 18:14
终于,在docker下,成功跑通,不过,这个运行速度好像很慢很慢。
一样的问题,能否加个联系方法,了解一下,这个教程真是一言难尽