Sigmoid

class dragon.vm.torch.nn.Sigmoid(inplace=False)[source]

Apply the sigmoid function.

The Sigmoid function is defined as:

\[\text{Sigmoid}(x) = \frac{1}{1 + \exp(-x)} \]

Examples:

m = torch.nn.Sigmoid()
x = torch.randn(2, 3)
y = m(x)

__init__

Sigmoid.__init__(inplace=False)[source]

Create a Sigmoid module.

Parameters:
  • inplace (bool, optional, default=False) – Whether to do the operation in-place.