Closed 9lan9 closed 2 years ago
I personally never used ONNX, so I don't think I can help, sorry! I'll keep the issue open in case anyone else can help.
I personally never used ONNX, so I don't think I can help, sorry! I'll keep the issue open in case anyone else can help.
ok, thanks.
output of _viterbi_decode
is a list of int lists with variable lengths which is invalid for onnx output.
just convert it to a tensor. for example:
output of
_viterbi_decode
is a list of int lists with variable lengths which is invalid for onnx output. just convert it to a tensor. for example:
convert list to tensor would cause problems, that's the problem
Cannot convert the CRF layer to ONNX even using the latest version of PyTorch. I guess the combination of some operators may cause issues in PyTorch converter. And it also cannot be converted to torchscript. Here is the version of CRF that can be converted torchscript: https://github.com/facebookresearch/pytext/blob/master/pytext/models/crf.py . Unfortunately, CRF code provided by pytext also cannot be converted to ONNX
pytorch model is converted to ONNX via torchscript, this issue is related #79
Actually, it is the same issue in https://github.com/pytorch/pytorch/issues/39245, any solution for this one?