Sigmoid.patch 792 B

1234567891011121314151617181920212223242526272829
  1. --- /usr/local/lib/python3.5/dist-packages/torch/nn/modules/activation.py
  2. +++ /usr/local/lib/python3.5/dist-packages/torch/nn/modules/activation.py
  3. @@ -2,7 +2,7 @@
  4. r"""Applies the element-wise function:
  5. .. math::
  6. - \text{Sigmoid}(x) = \sigma(x) = \frac{1}{1 + \exp(-x)}
  7. + \text{Sigmoid}(x) = \frac{1}{1 + \exp(-x)}
  8. Shape:
  9. @@ -10,7 +10,7 @@
  10. dimensions
  11. - Output: :math:`(N, *)`, same shape as the input
  12. - .. image:: ../scripts/activation_images/Sigmoid.png
  13. + .. image:: scripts/activation_images/Sigmoid.png
  14. Examples::
  15. @@ -19,6 +19,7 @@
  16. >>> output = m(input)
  17. """
  18. - def forward(self, input: Tensor) -> Tensor:
  19. + @weak_script_method
  20. + def forward(self, input):
  21. return torch.sigmoid(input)