diff options
author | Benoit Rostykus <brostykus@netflix.com> | 2018-12-19 14:55:37 -0800 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-12-19 15:04:24 -0800 |
commit | 07d20b1e7cfbb3a21a7e1832bbfee81080447292 (patch) | |
tree | 5df77383c05d5baf56128e8ec0ca98e9d22d90de /docs/cpp | |
parent | 055de167d5aecab73423174e5be3b1bad0a55a03 (diff) | |
download | pytorch-07d20b1e7cfbb3a21a7e1832bbfee81080447292.tar.gz pytorch-07d20b1e7cfbb3a21a7e1832bbfee81080447292.tar.bz2 pytorch-07d20b1e7cfbb3a21a7e1832bbfee81080447292.zip |
Fix documentation (#15372)
Summary:
Current documentation example doesn't compile. This fixes the doc so the example works.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15372
Differential Revision: D13522167
Pulled By: goldsborough
fbshipit-source-id: 5171a5f8e165eafabd9d1a28d23020bf2655f38b
Diffstat (limited to 'docs/cpp')
-rw-r--r-- | docs/cpp/source/frontend.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/cpp/source/frontend.rst b/docs/cpp/source/frontend.rst index 5855c3ea43..545b77226f 100644 --- a/docs/cpp/source/frontend.rst +++ b/docs/cpp/source/frontend.rst @@ -53,7 +53,7 @@ neural network on the MNIST dataset: torch::Tensor forward(torch::Tensor x) { // Use one of many tensor manipulation functions. x = torch::relu(fc1->forward(x)); - x = torch::dropout(x, /*p=*/0.5); + x = torch::dropout(x, /*p=*/0.5, /*train=*/true); x = torch::sigmoid(fc2->forward(x)); return x; } |