Toybrick

标题: pt转换问题 是环境原因吗 [打印本页]

作者: 1105060120    时间: 2020-10-13 15:59
标题: pt转换问题 是环境原因吗
terminate called after throwing an instance of 'c10::Error'
  what():  [enforce fail at inline_container.cc:127] . PytorchStreamReader failed closing reader: file not found
frame #0: std::function<std::string ()>:perator()() const + 0x11 (0x7f91e3906fe1 in /home/lix/.local/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: c10::ThrowEnforceNotMet(char const*, int, char const*, std::string const&, void const*) + 0x49 (0x7f91e3906c29 in /home/lix/.local/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #2: torch::jit:yTorchStreamReader::valid(char const*) + 0x80 (0x7f91463b3650 in /home/lix/.local/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #3: torch::jit:yTorchStreamReader::~PyTorchStreamReader() + 0x1f (0x7f91463b36ff in /home/lix/.local/lib/python3.6/site-packages/torch/lib/libcaffe2.so)
frame #4: <unknown function> + 0x67a541 (0x7f91dc267541 in /home/lix/.local/lib/python3.6/site-packages/torch/lib/libtorch.so.1)
frame #5: torch::jit::import_ir_module(std::function<std::shared_ptr<torch::jit::script::Module> (std::vector<std::string, std::allocator<std::string> > const&)>, std::string const&, c10:ptional<c10:evice>) + 0x15a (0x7f91dc26a2ca in /home/lix/.local/lib/python3.6/site-packages/torch/lib/libtorch.so.1)
frame #6: <unknown function> + 0x3a55a1 (0x7f91e9f485a1 in /home/lix/.local/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #7: <unknown function> + 0x116fac (0x7f91e9cb9fac in /home/lix/.local/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #8: python3() [0x50a7f5]
<omitting python frames>
frame #10: python3() [0x507f24]
frame #11: python3() [0x509c50]
frame #12: python3() [0x50a64d]
frame #14: python3() [0x509918]
frame #15: python3() [0x50a64d]
frame #17: python3() [0x507f24]
frame #19: python3() [0x634dd2]
frame #24: __libc_start_main + 0xe7 (0x7f9235342b97 in /lib/x86_64-linux-gnu/libc.so.6)

Aborted (core dumped)

作者: jefferyzhang    时间: 2020-10-14 08:33
核对下pt版本,目前只支持1.2.0。
然后可以加置顶帖的qq群讨论下
作者: 1105060120    时间: 2020-10-14 22:34
Traceback (most recent call last):
  File "synthesis.py", line 67, in <module>
    model, words, alpha=alpha)
  File "synthesis.py", line 47, in synthesis
    traced_script_module.save("c_fastspeech_model.pt")
RuntimeError:
could not export python function call Scatter. Remove calls to python functions before export.:
作者: 1105060120    时间: 2020-10-14 22:35
Traceback (most recent call last):
  File "test2.py", line 11, in <module>
    torch.load('c_fastspeech_model.pt')
  File "/home/lix/.local/lib/python3.6/site-packages/torch/serialization.py", line 367, in load
    return _load(f, map_location, pickle_module)
  File "/home/lix/.local/lib/python3.6/site-packages/torch/serialization.py", line 528, in _load
    magic_number = pickle_module.load(f)
_pickle.UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.
作者: 1105060120    时间: 2020-10-14 22:35
pt文件能转,但是load的时候有问题,是因为没转成功吗




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3