**Short description**: Sigmoid element-wise activation function.
-**Attributes**: operations has no attributes.
+**Detailed description**: [Reference](https://deepai.org/machine-learning-glossary-and-terms/sigmoid-function)
+
+**Attributes**: *Sigmoid* operation has no attributes.
+
+**Mathematical Formulation**
+
+ For each element from the input tensor calculates corresponding
+ element in the output tensor with the following formula:
+ \f[
+ sigmoid( x ) = \frac{1}{1+e^{-x}}
+ \f]
**Inputs**:
* **1**: Result of Sigmoid function applied to the input tensor *x*. Floating point tensor with shape and type matching the input tensor. Required.
-**Mathematical Formulation**
-
- For each element from the input tensor calculates corresponding
- element in the output tensor with the following formula:
- \f[
- sigmoid( x ) = \frac{1}{1+e^{-x}}
- \f]
\ No newline at end of file
+**Example**
+
+```xml
+<layer ... type="Sigmoid">
+ <input>
+ <port id="0">
+ <dim>256</dim>
+ <dim>56</dim>
+ </port>
+ </input>
+ <output>
+ <port id="1">
+ <dim>256</dim>
+ <dim>56</dim>
+ </port>
+ </output>
+</layer>
+
+```
\ No newline at end of file
out[i] = 1 / (1 + exp_value);
}
}
-
- template <typename T>
- void sigmoid_backprop(const T* arg, const T* delta_arg, T* out, size_t count)
- {
- T exp_value;
- T func_x;
- for (size_t i = 0; i < count; i++)
- {
- exp_value = std::exp(-arg[i]);
- func_x = 1 / (1 + exp_value);
- out[i] = delta_arg[i] * func_x * (1 - func_x);
- }
- }
}
}
}