Skip to content

Commit 8e584ce

Browse files
author
Thiago Crepaldi
committed
Address comments
1 parent 7cbfc9c commit 8e584ce

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

advanced_source/super_resolution_with_onnxruntime.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
(optional) Exporting a Model from PyTorch to ONNX and Running it using ONNX Runtime
3-
========================================================================
3+
===================================================================================
44
55
.. Note::
66
As of PyTorch 2.1, there are two versions of ONNX Exporter.
@@ -23,9 +23,10 @@
2323
and `ONNX Runtime <https://github.com/microsoft/onnxruntime>`__.
2424
You can get binary builds of ONNX and ONNX Runtime with
2525
26-
.. code-block:: bash
27-
%%bash
28-
pip install onnxruntime
26+
.. code-block:: bash
27+
28+
%%bash
29+
pip install onnxruntime
2930
3031
ONNX Runtime recommends using the latest stable runtime for PyTorch.
3132
@@ -195,7 +196,7 @@ def _initialize_weights(self):
195196

196197
import onnxruntime
197198

198-
ort_session = onnxruntime.InferenceSession("super_resolution.onnx", providers=['CPUExecutionProvider'])
199+
ort_session = onnxruntime.InferenceSession("super_resolution.onnx", providers=["CPUExecutionProvider"])
199200

200201
def to_numpy(tensor):
201202
return tensor.detach().cpu().numpy() if tensor.requires_grad else tensor.cpu().numpy()

0 commit comments

Comments
 (0)