Skip to content

Commit ce0db8b

Browse files
authored
Merge branch 'master' into docs-typo-operatos
2 parents 50e1b93 + f2579c6 commit ce0db8b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

beginner_source/introyt/autogradyt_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def forward(self, x):
269269
##########################################################################
270270
# One thing you might notice is that we never specify
271271
# ``requires_grad=True`` for the model’s layers. Within a subclass of
272-
# ``torch.nn.module``, it’s assumed that we want to track gradients on the
272+
# ``torch.nn.Module``, it’s assumed that we want to track gradients on the
273273
# layers’ weights for learning.
274274
#
275275
# If we look at the layers of the model, we can examine the values of the

beginner_source/introyt/introyt1_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
# Here’s a small sample of the mathematical operations available:
102102
#
103103

104-
r = torch.rand(2, 2) - 0.5 * 2 # values between -1 and 1
104+
r = (torch.rand(2, 2) - 0.5) * 2 # values between -1 and 1
105105
print('A random matrix, r:')
106106
print(r)
107107

beginner_source/introyt/modelsyt_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class LeNet(torch.nn.Module):
151151

152152
def __init__(self):
153153
super(LeNet, self).__init__()
154-
# 1 input image channel (black & white), 6 output channels, 3x3 square convolution
154+
# 1 input image channel (black & white), 6 output channels, 5x5 square convolution
155155
# kernel
156156
self.conv1 = torch.nn.Conv2d(1, 6, 5)
157157
self.conv2 = torch.nn.Conv2d(6, 16, 3)

0 commit comments

Comments
 (0)