Skip to content

Commit 78ba7d8

Browse files
kazuf3soumith
authored andcommitted
Question: requires_grad defaults False? (pytorch#276)
The example seems want to say if not specifies, it points to False.
1 parent 770ee6f commit 78ba7d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beginner_source/blitz/autograd_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
################################################################
7676
# ``.requires_grad_( ... )`` changes an existing Tensor's ``requires_grad``
77-
# flag in-place. The input flag defaults to ``True`` if not given.
77+
# flag in-place. The input flag defaults to ``False`` if not given.
7878
a = torch.randn(2, 2)
7979
a = ((a * 3) / (a - 1))
8080
print(a.requires_grad)

0 commit comments

Comments
 (0)