|
18 | 18 | -----
|
19 | 19 | To install ``torch`` and ``torchvision`` use the following command:
|
20 | 20 |
|
21 |
| -:: |
| 21 | +.. code-block:: |
22 | 22 |
|
23 | 23 | pip install torch torchvision
|
24 | 24 |
|
@@ -160,23 +160,23 @@ def train(data):
|
160 | 160 | #
|
161 | 161 | # Install PyTorch Profiler TensorBoard Plugin.
|
162 | 162 | #
|
163 |
| -# :: |
| 163 | +# .. code-block:: |
164 | 164 | #
|
165 | 165 | # pip install torch_tb_profiler
|
166 | 166 | #
|
167 | 167 |
|
168 | 168 | ######################################################################
|
169 | 169 | # Launch the TensorBoard.
|
170 | 170 | #
|
171 |
| -# :: |
| 171 | +# .. code-block:: |
172 | 172 | #
|
173 | 173 | # tensorboard --logdir=./log
|
174 | 174 | #
|
175 | 175 |
|
176 | 176 | ######################################################################
|
177 | 177 | # Open the TensorBoard profile URL in Google Chrome browser or Microsoft Edge browser.
|
178 | 178 | #
|
179 |
| -# :: |
| 179 | +# .. code-block:: |
180 | 180 | #
|
181 | 181 | # http://localhost:6006/#pytorch_profiler
|
182 | 182 | #
|
@@ -287,7 +287,7 @@ def train(data):
|
287 | 287 | # In this example, we follow the "Performance Recommendation" and set ``num_workers`` as below,
|
288 | 288 | # pass a different name such as ``./log/resnet18_4workers`` to ``tensorboard_trace_handler``, and run it again.
|
289 | 289 | #
|
290 |
| -# :: |
| 290 | +# .. code-block:: |
291 | 291 | #
|
292 | 292 | # train_loader = torch.utils.data.DataLoader(train_set, batch_size=32, shuffle=True, num_workers=4)
|
293 | 293 | #
|
@@ -316,7 +316,7 @@ def train(data):
|
316 | 316 | #
|
317 | 317 | # You can try it by using existing example on Azure
|
318 | 318 | #
|
319 |
| -# :: |
| 319 | +# .. code-block:: |
320 | 320 | #
|
321 | 321 | # pip install azure-storage-blob
|
322 | 322 | # tensorboard --logdir=https://torchtbprofiler.blob.core.windows.net/torchtbprofiler/demo/memory_demo_1_10
|
@@ -366,7 +366,7 @@ def train(data):
|
366 | 366 | #
|
367 | 367 | # You can try it by using existing example on Azure:
|
368 | 368 | #
|
369 |
| -# :: |
| 369 | +# .. code-block:: |
370 | 370 | #
|
371 | 371 | # pip install azure-storage-blob
|
372 | 372 | # tensorboard --logdir=https://torchtbprofiler.blob.core.windows.net/torchtbprofiler/demo/distributed_bert
|
|
0 commit comments