AIfES 2  2.0.0
ailayer_sigmoid.h
Go to the documentation of this file.
1 
37 #ifndef SIGMOID_LAYER
38 #define SIGMOID_LAYER
39 
40 #include "core/aifes_core.h"
41 
42 typedef struct ailayer_sigmoid ailayer_sigmoid_t;
43 
55 
66  void (*sigmoid)(const aitensor_t *x, aitensor_t *result);
67 
78  void (*d_sigmoid)(const aitensor_t *sigmoid_x, aitensor_t *result);
79 
87  void (*multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
88 
90 };
91 
98 
111 
133 
158 
169 
170 #ifdef AIDEBUG_PRINT_MODULE_SPECS
176 #endif // AIDEBUG_PRINT_MODULE_SPECS
177 
178 #endif // SIGMOID_LAYER
AIfES 2 core interface.
const aicore_layertype_t * ailayer_sigmoid_type
Sigmoid layer type.
void ailayer_sigmoid_backward(ailayer_t *self)
Calculate the backward pass for the given Sigmoid layer.
ailayer_t * ailayer_sigmoid(ailayer_sigmoid_t *layer, ailayer_t *input_layer)
Initialize and connect the given Sigmoid layer.
void ailayer_sigmoid_print_specs(const ailayer_t *self)
Print the layer specification.
void ailayer_sigmoid_forward(ailayer_t *self)
Calculate the forward pass for given Sigmoid layer.
void ailayer_sigmoid_calc_result_shape(ailayer_t *self)
Calculate the shape of the result tensor.
Type indicator of the layer.
Definition: aifes_core.h:79
General Sigmoid layer struct.
Definition: ailayer_sigmoid.h:47
void(* sigmoid)(const aitensor_t *x, aitensor_t *result)
Required math function: Sigmoid.
Definition: ailayer_sigmoid.h:66
void(* multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Required math function: Element wise tensor multiplication.
Definition: ailayer_sigmoid.h:87
void(* d_sigmoid)(const aitensor_t *sigmoid_x, aitensor_t *result)
Required math function: Derivative of sigmoid.
Definition: ailayer_sigmoid.h:78
ailayer_t base
Inherited field members from general ailayer struct.
Definition: ailayer_sigmoid.h:48
const aimath_dtype_t * dtype
Data type of the input and inference result values.
Definition: ailayer_sigmoid.h:49
AIfES layer interface.
Definition: aifes_core.h:249
Indicator for the used datatype.
Definition: aifes_math.h:44
A tensor in AIfES.
Definition: aifes_math.h:89