Hi - our models are not compatible with ONNX because they have state which is not contained in neural network weights (such as vocabularies). Additionally, ONNX essentially doesn't support models which contain python control flow. You will likely have more luck using torchscript from Pytorch 1.0, but even then I think it will be difficult to trace many of our models.
Hi - our models are not compatible with ONNX because they have state which is not contained in neural network weights (such as vocabularies). Additionally, ONNX essentially doesn't support models which contain python control flow. You will likely have more luck using
torchscriptfrom Pytorch 1.0, but even then I think it will be difficult to trace many of our models.
Facebook recently released a pytext platform which states that it supports model exporting feature by using onnx, They also explains why caffe2 is more stable. Do you think it's a must for allennlp ?
I wrote a tutorial on this topic, FYI @onetonfoot @robbine http://www.realworldnlpbook.com/blog/how-to-convert-an-allennlp-model-and-deploy-on-caffe2-and-tensorflow.html
Most helpful comment
I wrote a tutorial on this topic, FYI @onetonfoot @robbine http://www.realworldnlpbook.com/blog/how-to-convert-an-allennlp-model-and-deploy-on-caffe2-and-tensorflow.html