Skip to content

Commit 8476a99

Browse files
authored
Fix formatting to follow template for Profiler Recipe (#3437)
1 parent da1f9d0 commit 8476a99

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

recipes_source/recipes/profiler_recipe.py

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,29 @@
55
"""
66

77
######################################################################
8-
"""
9-
This recipe explains how to use PyTorch profiler and measure the time and
10-
memory consumption of the model's operators.
11-
12-
Introduction
13-
------------
14-
PyTorch includes a simple profiler API that is useful when user needs
15-
to determine the most expensive operators in the model.
16-
17-
In this recipe, we will use a simple Resnet model to demonstrate how to
18-
use profiler to analyze model performance.
19-
20-
Prerequisites
21-
---------------
22-
- ``torch >= 1.9``
23-
24-
Setup
25-
-----
26-
To install ``torch`` and ``torchvision`` use the following command:
27-
28-
.. code-block:: sh
29-
30-
pip install torch torchvision
31-
32-
"""
8+
# This recipe explains how to use PyTorch profiler and measure the time and
9+
# memory consumption of the model's operators.
10+
#
11+
# Introduction
12+
# ------------
13+
# PyTorch includes a simple profiler API that is useful when the user needs
14+
# to determine the most expensive operators in the model.
15+
#
16+
# In this recipe, we will use a simple Resnet model to demonstrate how to
17+
# use the profiler to analyze model performance.
18+
#
19+
# Prerequisites
20+
# ---------------
21+
# - ``torch >= 2.3.0``
22+
#
23+
# Setup
24+
# -----
25+
# To install ``torch`` and ``torchvision`` use the following command:
26+
#
27+
# .. code-block:: sh
28+
#
29+
# pip install torch torchvision
30+
#
3331

3432
######################################################################
3533
# Steps

0 commit comments

Comments
 (0)