| AIfES 2 2.0.0

ailayer_softmax.h
Go to the documentation of this file.
1
41 #ifndef SOFTMAX_LAYER
42 #define SOFTMAX_LAYER
43
44 #include "core/aifes_core.h"
45
46 typedef struct ailayer_softmax ailayer_softmax_t;
47
51 struct ailayer_softmax {
52 ailayer_t base;
58
69 void (*softmax)(const aitensor_t *x, aitensor_t *result);
70
72 };
73
79 extern const aicore_layertype_t *ailayer_softmax_type;
80
92 ailayer_t *ailayer_softmax(ailayer_softmax_t *layer, ailayer_t *input_layer);
93
114 void ailayer_softmax_forward(ailayer_t *self);
115
125 void ailayer_softmax_calc_result_shape(ailayer_t *self);
126
127 #ifdef AIDEBUG_PRINT_MODULE_SPECS
132 void ailayer_softmax_print_specs(const ailayer_t *self);
133 #endif // AIDEBUG_PRINT_MODULE_SPECS
134
135 #endif // SOFTMAX_LAYER
aifes_core.h
AIfES 2 core interface.
ailayer_softmax_calc_result_shape
void ailayer_softmax_calc_result_shape(ailayer_t *self)
Calculate the shape of the result tensor.
ailayer_softmax_type
const aicore_layertype_t * ailayer_softmax_type
Softmax layer type.
ailayer_softmax
ailayer_t * ailayer_softmax(ailayer_softmax_t *layer, ailayer_t *input_layer)
Initialize and connect the given Softmax layer.
ailayer_softmax_forward
void ailayer_softmax_forward(ailayer_t *self)
Calculate the forward pass for given Softmax layer.
ailayer_softmax_print_specs
void ailayer_softmax_print_specs(const ailayer_t *self)
Print the layer specification.
aicore_layertype
Type indicator of the layer.
Definition: aifes_core.h:82
ailayer_softmax
General Softmax layer struct.
Definition: ailayer_softmax.h:51
ailayer_softmax::softmax
void(* softmax)(const aitensor_t *x, aitensor_t *result)
Required math function: Softmax.
Definition: ailayer_softmax.h:69
ailayer_softmax::base
ailayer_t base
Inherited field members from general ailayer struct.
Definition: ailayer_softmax.h:52
ailayer
AIfES layer interface.
Definition: aifes_core.h:252
aitensor
A tensor in AIfES.
Definition: aifes_math.h:89