mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
22 lines
409 B
Markdown
22 lines
409 B
Markdown
|
|
# TransformerModel example
|
||
|
|
|
||
|
|
This example was adapted from Pytorch's [Sequence-to-Sequence Modeling with nn.Transformer and TorchText](https://pytorch.org/tutorials/beginner/transformer_tutorial.html) tutorial
|
||
|
|
|
||
|
|
## Requirements
|
||
|
|
|
||
|
|
* PyTorch 1.6+
|
||
|
|
* TorchText 0.6+
|
||
|
|
* ONNX Runtime 1.5+
|
||
|
|
|
||
|
|
## Running PyTorch version
|
||
|
|
|
||
|
|
```python
|
||
|
|
python pt_model.py
|
||
|
|
```
|
||
|
|
|
||
|
|
## Running ONNX Runtime version
|
||
|
|
|
||
|
|
```python
|
||
|
|
python ort_model.py
|
||
|
|
```
|