Skip to content

Commit 640fd89

Browse files
Rachel0619svekars
andauthored
Remove Markdown backticks, use RST syntax for code block (#3381)
* Fix #2814: Remove Markdown backticks, use RST syntax for code block --------- Co-authored-by: Svetlana Karslioglu <[email protected]>
1 parent 50ba81f commit 640fd89

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

beginner_source/introyt/introyt1_tutorial.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -303,22 +303,21 @@ def num_flat_features(self, x):
303303
# The values passed to the transform are the means (first tuple) and the
304304
# standard deviations (second tuple) of the rgb values of the images in
305305
# the dataset. You can calculate these values yourself by running these
306-
# few lines of code:
307-
# ```
308-
# from torch.utils.data import ConcatDataset
309-
# transform = transforms.Compose([transforms.ToTensor()])
310-
# trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
306+
# few lines of code::
307+
#
308+
# from torch.utils.data import ConcatDataset
309+
# transform = transforms.Compose([transforms.ToTensor()])
310+
# trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
311311
# download=True, transform=transform)
312312
#
313-
# #stack all train images together into a tensor of shape
314-
# #(50000, 3, 32, 32)
315-
# x = torch.stack([sample[0] for sample in ConcatDataset([trainset])])
313+
# # stack all train images together into a tensor of shape
314+
# # (50000, 3, 32, 32)
315+
# x = torch.stack([sample[0] for sample in ConcatDataset([trainset])])
316316
#
317-
# #get the mean of each channel
318-
# mean = torch.mean(x, dim=(0,2,3)) #tensor([0.4914, 0.4822, 0.4465])
319-
# std = torch.std(x, dim=(0,2,3)) #tensor([0.2470, 0.2435, 0.2616])
320-
#
321-
# ```
317+
# # get the mean of each channel
318+
# mean = torch.mean(x, dim=(0,2,3)) # tensor([0.4914, 0.4822, 0.4465])
319+
# std = torch.std(x, dim=(0,2,3)) # tensor([0.2470, 0.2435, 0.2616])
320+
#
322321
#
323322
# There are many more transforms available, including cropping, centering,
324323
# rotation, and reflection.

0 commit comments

Comments
 (0)