PetrochukM / PyTorch-NLP

Basic Utilities for PyTorch Natural Language Processing (NLP)
https://pytorchnlp.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.21k stars 257 forks source link

ONNX support for Encoders #95

Open cjermain opened 4 years ago

cjermain commented 4 years ago

Based on some initial experiments, it looks like the Encoder classes can not be exported to the ONNX format using torch.onnx.export. It would be great to be able to package them into an ONNX graph along with the rest of the model. Has anyone looked at this?

I think the relevant operators are available in the ONNX spec, so I may give it a try in the near future.

PetrochukM commented 4 years ago

That'd be cool :) Great idea!