Skip to content

Commit 1ad7170

Browse files
committed
[ONNX 3] Add ONNX registry tutorial
1 parent 8facb1e commit 1ad7170

12 files changed

+476
-3
lines changed
Loading
7.37 KB
Loading
12.4 KB
Loading
8.41 KB
Loading
22.1 KB
Loading
6.8 KB
Loading

beginner_source/onnx/README.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ ONNX
88
2. export_simple_model_to_onnx_tutorial.py
99
Export a PyTorch model to ONNX
1010
https://pytorch.org/tutorials/beginner/onnx/export_simple_model_to_onnx_tutorial.html
11+
12+
3. onnx_registry_tutorial.py
13+
Introduction to ONNX
14+
https://pytorch.org/tutorials/beginner/onnx/onnx_registry_tutorial.html

beginner_source/onnx/export_simple_model_to_onnx_tutorial.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
33
`Introduction to ONNX <intro_onnx.html>`_ ||
4-
**Export a PyTorch model to ONNX**
4+
**Export a PyTorch model to ONNX** ||
5+
`Introduction to ONNX Registry <onnx_registry_tutorial.html>`_
56
67
Export a PyTorch model to ONNX
78
==============================

beginner_source/onnx/intro_onnx.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
**Introduction to ONNX** ||
3-
`Export a PyTorch model to ONNX <export_simple_model_to_onnx_tutorial.html>`_
3+
`Export a PyTorch model to ONNX <export_simple_model_to_onnx_tutorial.html>`_ ||
4+
`Introduction to ONNX Registry <onnx_registry_tutorial.html>`_
45
56
Introduction to ONNX
67
====================
@@ -32,13 +33,21 @@
3233
Dependencies
3334
------------
3435
36+
PyTorch 2.1.0 or newer is required.
37+
3538
The ONNX exporter depends on extra Python packages:
3639
3740
- `ONNX <https://onnx.ai>`_
3841
- `ONNX Script <https://onnxscript.ai>`_
3942
4043
They can be installed through `pip <https://pypi.org/project/pip/>`_:
4144
45+
.. note::
46+
This tutorial leverages `onnxscript <https://github.com/microsoft/onnxscript#readme>`__
47+
to create custom ONNX operators. onnxscript is a Python library that allows users to
48+
create custom ONNX operators in Python. It is a prerequisite learning material for
49+
this tutorial. Please make sure you have read the onnxscript tutorial before proceeding.
50+
4251
.. code-block:: bash
4352
4453
pip install --upgrade onnx onnxscript

0 commit comments

Comments
 (0)