AIfES 2
2.0.0
|
General Sigmoid layer struct. More...
#include <ailayer_sigmoid.h>
Data Fields | |
ailayer_t | base |
Inherited field members from general ailayer struct. | |
Math functions | |
Required data type specific math functions | |
void(* | sigmoid )(const aitensor_t *x, aitensor_t *result) |
Required math function: Sigmoid. More... | |
void(* | d_sigmoid )(const aitensor_t *sigmoid_x, aitensor_t *result) |
Required math function: Derivative of sigmoid. More... | |
void(* | multiply )(const aitensor_t *a, const aitensor_t *b, aitensor_t *result) |
Required math function: Element wise tensor multiplication. More... | |
General Sigmoid layer struct.
void(* d_sigmoid) (const aitensor_t *sigmoid_x, aitensor_t *result) |
Required math function: Derivative of sigmoid.
Requires a math function that calculates the element wise sigmoid derivative of a tensor:
\[ result_{i} = \sigma'(x_{i}) = \sigma(x_{i}) \cdot (1 - \sigma(x_{i})) \]
sigmoid_x | N-dimensional tensor with the sigmoid values \( \sigma(x_{i}) \) (input) |
result | N-dimensional tensor (output) |
void(* multiply) (const aitensor_t *a, const aitensor_t *b, aitensor_t *result) |
Required math function: Element wise tensor multiplication.
Requires a math function that multiplies two tensors element wise:
\[ result = a \circ b \]
void(* sigmoid) (const aitensor_t *x, aitensor_t *result) |
Required math function: Sigmoid.
Requires a math function that calculates the element wise sigmoid of a tensor:
\[ result_{i} = \sigma(x_{i}) = \frac{1}{1 + e^{-x_{i}}} \]
x | N-dimensional tensor (input) |
result | N-dimensional tensor (output) |