onnxruntime/samples/python/pytorch_transformer
Bowen Bao db6a821869
Enable example transformer test with dynamic size inputs (#4888)
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
2020-08-24 14:31:08 -07:00
..
ort_utils.py Add new PytTrch front-end (#4815) 2020-08-17 09:45:25 -07:00
pt_model.py Enable example transformer test with dynamic size inputs (#4888) 2020-08-24 14:31:08 -07:00
README.md Add new PytTrch front-end (#4815) 2020-08-17 09:45:25 -07:00
utils.py Add new PytTrch front-end (#4815) 2020-08-17 09:45:25 -07:00

TransformerModel example

This example was adapted from Pytorch's Sequence-to-Sequence Modeling with nn.Transformer and TorchText tutorial

Requirements

  • PyTorch 1.6+
  • TorchText 0.6+
  • ONNX Runtime 1.5+

Running PyTorch version

python pt_model.py

Running ONNX Runtime version

python ort_model.py