AIfES 2  2.0.0
ailayer_leaky_relu.h
Go to the documentation of this file.
1 
40 #ifndef LEAKY_RELU_LAYER
41 #define LEAKY_RELU_LAYER
42 
43 #include "core/aifes_core.h"
44 
46 
59  void *alpha;
62 
67 
81  void (*leaky_relu)(const aitensor_t *x, const void *alpha, aitensor_t *result);
82 
96  void (*d_leaky_relu)(const aitensor_t *x, const void *alpha, aitensor_t *result);
97 
105  void (*multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
106 
108 };
109 
116 
129 
151 
176 
187 
188 #ifdef AIDEBUG_PRINT_MODULE_SPECS
194 #endif // AIDEBUG_PRINT_MODULE_SPECS
195 
196 #endif // LEAKY_RELU_LAYER
AIfES 2 core interface.
void ailayer_leaky_relu_calc_result_shape(ailayer_t *self)
Calculate the shape of the result tensor.
ailayer_t * ailayer_leaky_relu(ailayer_leaky_relu_t *layer, ailayer_t *input_layer)
Initialize and connect the given Leaky ReLU layer.
void ailayer_leaky_relu_print_specs(const ailayer_t *self)
Print the layer specification.
void ailayer_leaky_relu_forward(ailayer_t *self)
Calculate the forward pass for given Leaky ReLU layer.
void ailayer_leaky_relu_backward(ailayer_t *self)
Calculate the backward pass for the given Leaky ReLU layer.
const aicore_layertype_t * ailayer_leaky_relu_type
Leaky ReLU layer type.
Type indicator of the layer.
Definition: aifes_core.h:82
General Leaky ReLU layer struct.
Definition: ailayer_leaky_relu.h:50
void(* multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Required math function: Element wise tensor multiplication.
Definition: ailayer_leaky_relu.h:105
const aimath_dtype_t * alpha_dtype
Data type of scalar parameter .
Definition: ailayer_leaky_relu.h:60
void * alpha
Parameter used to calculate Leaky ReLU function for input values < 0.
Definition: ailayer_leaky_relu.h:59
ailayer_t base
Inherited field members from general ailayer struct.
Definition: ailayer_leaky_relu.h:51
void(* leaky_relu)(const aitensor_t *x, const void *alpha, aitensor_t *result)
Required math function: Leaky ReLU.
Definition: ailayer_leaky_relu.h:81
void(* d_leaky_relu)(const aitensor_t *x, const void *alpha, aitensor_t *result)
Required math function: Derivative of Leaky ReLU.
Definition: ailayer_leaky_relu.h:96
AIfES layer interface.
Definition: aifes_core.h:252
Indicator for the used datatype.
Definition: aifes_math.h:44
A tensor in AIfES.
Definition: aifes_math.h:89