summaryrefslogtreecommitdiff
path: root/docs/source/notes
diff options
context:
space:
mode:
authorbraincodercn <braincoder@aliyun.com>2018-05-21 23:10:24 +0800
committerSoumith Chintala <soumith@gmail.com>2018-05-21 11:10:24 -0400
commit5ee5537b9800bb312575247873c0e5139b30bfe4 (patch)
tree7615f5112aef766e5d2d543c8b918e41f46a431a /docs/source/notes
parent28b592e00bcf7c1484964001817f1104e876e54c (diff)
downloadpytorch-5ee5537b9800bb312575247873c0e5139b30bfe4.tar.gz
pytorch-5ee5537b9800bb312575247873c0e5139b30bfe4.tar.bz2
pytorch-5ee5537b9800bb312575247873c0e5139b30bfe4.zip
Fix typo in document (#7725)
Diffstat (limited to 'docs/source/notes')
-rw-r--r--docs/source/notes/extending.rst4
-rw-r--r--docs/source/notes/multiprocessing.rst2
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/source/notes/extending.rst b/docs/source/notes/extending.rst
index f03b9f436e..55732ae0ca 100644
--- a/docs/source/notes/extending.rst
+++ b/docs/source/notes/extending.rst
@@ -107,8 +107,8 @@ numerical approximations using small finite differences::
# gradcheck takes a tuple of tensors as input, check if your gradient
# evaluated with these tensors are close enough to numerical
# approximations and returns True if they all verify this condition.
- input = (Variable(torch.randn(20,20).double(), requires_grad=True), Variable(torch.randn(30,20).double(), requires_grad=True),)
- test = gradcheck(Linear.apply, input, eps=1e-6, atol=1e-4)
+ input = (torch.randn(20,20,dtype=torch.double,requires_grad=True), torch.randn(30,20,dtype=torch.double,requires_grad=True))
+ test = gradcheck(linear, input, eps=1e-6, atol=1e-4)
print(test)
Extending :mod:`torch.nn`
diff --git a/docs/source/notes/multiprocessing.rst b/docs/source/notes/multiprocessing.rst
index 90d7e3f34f..1992a550c1 100644
--- a/docs/source/notes/multiprocessing.rst
+++ b/docs/source/notes/multiprocessing.rst
@@ -119,6 +119,6 @@ example below as well::
p.start()
processes.append(p)
for p in processes:
- p.join()
+ p.join()
.. __: https://github.com/pytorch/examples/tree/master/mnist_hogwild