Add documentation for nn.Hardsigmoid and nn.functional.hardsigmoid. (#38120)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/38120

Test Plan: build docs locally and attach a screenshot to this PR.

Differential Revision: D21477815

Pulled By: zou3519

fbshipit-source-id: 420bbcfcbd191d1a8e33cdf4a90c95bf00a5d226
This commit is contained in:
Richard Zou
2020-05-08 13:54:27 -07:00
committed by Facebook GitHub Bot
parent 41572116f6
commit 172bcdb8c8
4 changed files with 9 additions and 2 deletions

View File

@ -1617,7 +1617,7 @@ def hardsigmoid(input, inplace=False):
\text{Hardsigmoid}(x) = \begin{cases}
0 & \text{if~} x \le -3, \\
1 & \text{if~} x \ge +3, \\
x / 6 & \text{otherwise}
x / 6 + 1 / 2 & \text{otherwise}
\end{cases}
Args: