AIfES 2  2.0.0
ailayer_softsign.h
Go to the documentation of this file.
1 
41 #ifndef SOFTSIGN_LAYER
42 #define SOFTSIGN_LAYER
43 
44 #include "core/aifes_core.h"
45 
47 
59 
70  void (*softsign)(const aitensor_t *x, aitensor_t *result);
71 
82  void (*d_softsign)(const aitensor_t *softsign_x, aitensor_t *result);
83 
91  void (*multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
92 
94 };
95 
102 
115 
137 
162 
173 
174 #ifdef AIDEBUG_PRINT_MODULE_SPECS
180 void ailayer_softsign_print_specs(const ailayer_t *self, int (*print)(const char *format, ...));
181 #endif // AIDEBUG_PRINT_MODULE_SPECS
182 
183 #endif // SOFTSIGN_LAYER
AIfES 2 core interface.
ailayer_t * ailayer_softsign(ailayer_softsign_t *layer, ailayer_t *input_layer)
Initialize and connect the given Softsign layer.
void ailayer_softsign_print_specs(const ailayer_t *self, int(*print)(const char *format,...))
Print the layer specification.
void ailayer_softsign_backward(ailayer_t *self)
Calculate the backward pass for the given Softsign layer.
const aicore_layertype_t * ailayer_softsign_type
Softsign layer type.
void ailayer_softsign_forward(ailayer_t *self)
Calculate the forward pass for given Tanh layer.
void ailayer_softsign_calc_result_shape(ailayer_t *self)
Calculate the shape of the result tensor.
Type indicator of the layer.
Definition: aifes_core.h:81
General Softsign layer struct.
Definition: ailayer_softsign.h:51
void(* multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Required math function: Element wise tensor multiplication.
Definition: ailayer_softsign.h:91
void(* d_softsign)(const aitensor_t *softsign_x, aitensor_t *result)
Required math function: Derivative of softsign.
Definition: ailayer_softsign.h:82
void(* softsign)(const aitensor_t *x, aitensor_t *result)
Required math function: Softsign.
Definition: ailayer_softsign.h:70
ailayer_t base
Inherited field members from general ailayer struct.
Definition: ailayer_softsign.h:52
const aimath_dtype_t * dtype
Data type of the input and inference result values.
Definition: ailayer_softsign.h:53
AIfES layer interface.
Definition: aifes_core.h:251
Indicator for the used datatype.
Definition: aifes_math.h:53
A tensor in AIfES.
Definition: aifes_math.h:98