Spec-Zone.ru › PyTorch 1

Softsign

class torch.nn.Softsign [source]

Applies the element-wise function:

SoftSign(x)=x1+∣x∣\text{SoftSign}(x) = \frac{x}{ 1 + |x|}
Shape:
  • Input: (∗)(*), where ∗* means any number of dimensions.
  • Output: (∗)(*), same shape as the input.
../_images/Softsign.png

Examples:

>>> m = nn.Softsign()
>>> input = torch.randn(2)
>>> output = m(input)

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/1.13/generated/torch.nn.Softsign.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API