Sigmoid#
- class brainpy.dnn.Sigmoid(name=None, mode=None)[source]#
Applies the element-wise function:
\[\text{Sigmoid}(x) = \sigma(x) = \frac{1}{1 + \exp(-x)}\]- Shape:
Input: \((*)\), where \(*\) means any number of dimensions.
Output: \((*)\), same shape as the input.
Examples:
>>> import brainpy as bp >>> import brainpy.math as bm >>> m = bp.dnn.Sigmoid() >>> input = bm.random.randn(2) >>> output = m(input)