Skip to content

Commit 1532c0d

Browse files
committed
update the tutorial.
1 parent ad5eb25 commit 1532c0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

beginner_source/basics/autogradqs_tutorial.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
y = torch.zeros(3) # expected output
3333
w = torch.randn(5, 3, requires_grad=True)
3434
b = torch.randn(3, requires_grad=True)
35-
z = torch.matmul(x, w)+b
35+
z = torch.matmul(x, w) + b
3636
loss = torch.nn.functional.binary_cross_entropy_with_logits(z, y)
3737

3838

@@ -133,7 +133,7 @@
133133
# - To mark some parameters in your neural network as **frozen parameters**.
134134
# - To **speed up computations** when you are only doing forward pass, because computations on tensors that do
135135
# not track gradients would be more efficient.
136-
# For additional reference, you can view the autograd mechanics
136+
# For additional reference, you can view the autograd mechanics
137137
# documentation:https://docs.pytorch.org/docs/stable/notes/autograd.html#locally-disabling-gradient-computation
138138

139139
######################################################################
@@ -171,7 +171,7 @@
171171
#
172172
# 2. Torchviz
173173
# Torchviz is a package to render the computational graph visually.
174-
#
174+
#
175175
# We can generate an image for the computational graph in the example given below:
176176
#
177177
# import torch

0 commit comments

Comments
 (0)