Rate this Page

Sigmoid#

class torch.nn.modules.activation.Sigmoid(*args, **kwargs)[source]#

Applies the Sigmoid function element-wise.

Sigmoid(x)=σ(x)=1+exp(x)1
Shape:
  • Input: (), where means any number of dimensions.

  • Output: (), same shape as the input.

../_images/Sigmoid.png

Examples:

>>> m = nn.Sigmoid()
>>> input = torch.randn(2)
>>> output = m(input)
forward(input)[source]#

Runs the forward pass.

Return type

Tensor

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources
Morty Proxy This is a proxified and sanitized view of the page, visit original site.