Pytorch jit script error

Hi I’m trying to export my code to jit script, but come across the following error:
RuntimeError: inputs_.size() == 1 INTERNAL ASSERT FAILED at /pytorch/torch/csrc/jit/ir.h:364, please report a bug to PyTorch. (input at /pytorch/torch/csrc/jit/ir.h:364)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7f193351b813 in /job/.local/lib/python3.7/site-packages/torch/lib/
frame #1: + 0x51af79 (0x7f19364baf79 in /job/.local/lib/python3.7/site-packages/torch/lib/
frame #2: + 0x516db5 (0x7f19364b6db5 in /job/.local/lib/python3.7/site-packages/torch/lib/
frame #3: torch::jit::PeepholeOptimizeONNX(std::shared_ptrtorch::jit::Graph&, int, bool) + 0xcb (0x7f19364baa5b in /job/.local/lib/python3.7/site-packages/torch/lib/
frame #4: + 0x4cfbd5 (0x7f193646fbd5 in /job/.local/lib/python3.7/site-packages/torch/lib/
frame #5: + 0x210ba4 (0x7f19361b0ba4 in /job/.local/lib/python3.7/site-packages/torch/lib/

frame #32: __libc_start_main + 0xe7 (0x7f193a3dab97 in /lib/x86_64-linux-gnu/

Is there any clue on what problem it is? Thanks

It looks quite bad yes.
Can you share a small code sample that reproduces this issue?

It’s pretty deal with this function, i move out this function as a non-class function and add @torch.jit.script

Hi @shy,

This looks like an issue with some precondition in ONNX export. Do you mind filing an issue on github so we can route this to the right developers?