AIfES 2 2.0.0
ailayer_tanh.h
Go to the documentation of this file.
1
40#ifndef TANH_LAYER
41#define TANH_LAYER
42
43#include "core/aifes_core.h"
44
45typedef struct ailayer_tanh ailayer_tanh_t;
46
58
69 void (*tanh)(const aitensor_t *x, aitensor_t *result);
70
81 void (*d_tanh)(const aitensor_t *tanh_x, aitensor_t *result);
82
90 void (*multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
91
93};
94
101
114
136
161
172
173#ifdef AIDEBUG_PRINT_MODULE_SPECS
180#endif // AIDEBUG_PRINT_MODULE_SPECS
181
182#endif // TANH_LAYER
AIfES 2 core interface.
const aicore_layertype_t * ailayer_tanh_type
Tanh layer type.
void ailayer_tanh_forward(ailayer_t *self)
Calculate the forward pass for given Tanh layer.
void ailayer_tanh_backward(ailayer_t *self)
Calculate the backward pass for the given Tanh layer.
void ailayer_tanh_calc_result_shape(ailayer_t *self)
Calculate the shape of the result tensor.
void ailayer_tanh_print_specs(const ailayer_t *self)
Print the layer specification.
ailayer_t * ailayer_tanh(ailayer_tanh_t *layer, ailayer_t *input_layer)
Initialize and connect the given Tanh layer.
Type indicator of the layer.
Definition: aifes_core.h:82
General Tanh layer struct.
Definition: ailayer_tanh.h:50
void(* tanh)(const aitensor_t *x, aitensor_t *result)
Required math function: Tanh.
Definition: ailayer_tanh.h:69
void(* d_tanh)(const aitensor_t *tanh_x, aitensor_t *result)
Required math function: Derivative of tanh.
Definition: ailayer_tanh.h:81
void(* multiply)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Required math function: Element wise tensor multiplication.
Definition: ailayer_tanh.h:90
ailayer_t base
Inherited field members from general ailayer struct.
Definition: ailayer_tanh.h:51
const aimath_dtype_t * dtype
Data type of the input and inference result values.
Definition: ailayer_tanh.h:52
AIfES layer interface.
Definition: aifes_core.h:252
Indicator for the used datatype.
Definition: aifes_math.h:47
A tensor in AIfES.
Definition: aifes_math.h:92