|
5#
楼主 |
发表于 2020-2-3 17:35:31
|
只看该作者
thanks for your reply.
It seems like there is problem with pytorch too,
I convert to that model pytorch and try converting to rknn.
The error log is:
- E Catch exception when loading pytorch model: ./last.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 499, in rknn.base.RKNNlib.converter.convert_pytorch.convert_pytorch.__init__
- E File "/home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/torch/jit/__init__.py", line 235, in load
- E cpp_module = torch._C.import_ir_module(cu, f, map_location, _extra_files)
- E RuntimeError: [enforce fail at inline_container.cc:143] . PytorchStreamReader failed reading zip archive: failed finding central directory
- E frame #0: c10::ThrowEnforceNotMet(char const*, int, char const*, std::string const&, void const*) + 0x47 (0x7f0108abbd37 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/torch/lib/libc10.so)
- E frame #1: caffe2::serialize::PyTorchStreamReader::valid(char const*, char const*) + 0x72 (0x7f010bc3eb62 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/torch/lib/libtorch.so)
- E frame #2: caffe2::serialize::PyTorchStreamReader::init() + 0xa1 (0x7f010bc41b31 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/torch/lib/libtorch.so)
- E frame #3: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::string const&) + 0x64 (0x7f010bc44c04 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/torch/lib/libtorch.so)
- E frame #4: torch::jit::import_ir_module(std::shared_ptr<torch::jit::script::CompilationUnit>, std::string const&, c10::optional<c10::Device>, std::unordered_map<std::string, std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::pair<std::string const, std::string> > >&) + 0x35 (0x7f010cfa4845 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/torch/lib/libtorch.so)
- E frame #5: <unknown function> + 0x776ffb (0x7f0153c25ffb in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
- E frame #6: <unknown function> + 0x2961c4 (0x7f01537451c4 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
- E frame #7: python() [0x4f8925]
- E <omitting python frames>
- E frame #9: python() [0x4f6128]
- E frame #11: <unknown function> + 0x18578 (0x7f01b8475578 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/base/RKNNlib/converter/convert_pytorch.cpython-36m-x86_64-linux-gnu.so)
- E frame #12: <unknown function> + 0x18e37 (0x7f01b8475e37 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/base/RKNNlib/converter/convert_pytorch.cpython-36m-x86_64-linux-gnu.so)
- E frame #13: <unknown function> + 0xb04d5 (0x7f01b850d4d5 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/base/RKNNlib/converter/convert_pytorch.cpython-36m-x86_64-linux-gnu.so)
- E frame #14: python() [0x5a105c]
- E frame #15: python() [0x512be5]
- E frame #16: python() [0x53ee21]
- E frame #17: <unknown function> + 0x6a4c (0x7f01c0948a4c in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/base/RKNNlib/app/importer/import_pytorch.cpython-36m-x86_64-linux-gnu.so)
- E frame #18: <unknown function> + 0xc67c (0x7f01c094e67c in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/base/RKNNlib/app/importer/import_pytorch.cpython-36m-x86_64-linux-gnu.so)
- E frame #19: <unknown function> + 0x1255c (0x7f01c095455c in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/base/RKNNlib/app/importer/import_pytorch.cpython-36m-x86_64-linux-gnu.so)
- E frame #20: <unknown function> + 0x20bdd (0x7f01c9e0ebdd in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/api/rknn_base.cpython-36m-x86_64-linux-gnu.so)
- E frame #21: <unknown function> + 0x20dde (0x7f01c9e0edde in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/api/rknn_base.cpython-36m-x86_64-linux-gnu.so)
- E frame #22: <unknown function> + 0xce615 (0x7f01c9ebc615 in /home/nrknn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/api/rknn_base.cpython-36m-x86_64-linux-gnu.so)
- E frame #24: python() [0x4f88ba]
- E frame #26: python() [0x4f6128]
- E frame #27: python() [0x4f7d60]
- E frame #28: python() [0x4f876d]
- E frame #30: python() [0x4f6128]
- E frame #32: python() [0x6415b2]
- E frame #37: __libc_start_main + 0xe7 (0x7f01cbddbb97 in /lib/x86_64-linux-gnu/libc.so.6)
- Traceback (most recent call last):
- File "rknn_transform.py", line 28, in <module>
- rknn.build(do_quantization=True, dataset='./dataset.txt')
- File "/home/nvnn/Downloads/env_rknn11/lib/python3.6/site-packages/rknn/api/rknn.py", line 220, in build
- inputs = self.rknn_base.net.get_input_layers()
- AttributeError: 'NoneType' object has no attribute 'get_input_layers'
|
|