AIfES 2  2.0.0
ailayer_reshape.h
Go to the documentation of this file.
1 
31 #ifndef AILAYER_RESHAPE_H
32 #define AILAYER_RESHAPE_H
33 
34 #include "core/aifes_core.h"
35 
36 typedef struct ailayer_reshape ailayer_reshape_t;
37 typedef struct ailayer_flatten ailayer_flatten_t;
38 
51  uint8_t output_dim;
52  uint8_t infer_axis;
53  uint16_t *output_shape;
55 
60 
69  void (*reshape)(const aitensor_t *x, aitensor_t *result);
70 
72 };
73 
81  uint16_t output_shape[2];
82 };
83 
90 
103 
120 
137 
147 
148 #ifdef AIDEBUG_PRINT_MODULE_SPECS
154 #endif // AIDEBUG_PRINT_MODULE_SPECS
155 
156 #endif // AILAYER_RESHAPE_H
AIfES 2 core interface.
void ailayer_reshape_calc_result_shape(ailayer_t *self)
Calculate the shape of the result tensor (ailayer.result)
const aicore_layertype_t * ailayer_reshape_type
Reshape layer type.
void ailayer_reshape_backward(ailayer_t *self)
Calculate the backward pass for given Reshape layer.
void ailayer_reshape_forward(ailayer_t *self)
Calculate the forward pass for given Reshape layer.
ailayer_t * ailayer_reshape(ailayer_reshape_t *layer, ailayer_t *input_layer)
Initialize and connect the given Reshape layer.
void ailayer_reshape_print_specs(const ailayer_t *self)
Print the layer specification.
Type indicator of the layer.
Definition: aifes_core.h:82
Structure of the Flatten layer, based on the reshape layer .
Definition: ailayer_reshape.h:78
ailayer_reshape_t base
Inherited field members from reshape layer struct.
Definition: ailayer_reshape.h:79
uint16_t output_shape[2]
Target 2D shape for flatten operation.
Definition: ailayer_reshape.h:81
General layer structure.
Definition: ailayer_reshape.h:42
uint8_t infer_axis
Specifies the axis that is inferred from the elements of the tensor and remaining axes (Set to zero i...
Definition: ailayer_reshape.h:52
void(* reshape)(const aitensor_t *x, aitensor_t *result)
Optional math function: Reshape.
Definition: ailayer_reshape.h:69
uint8_t output_dim
Output dimension count (length of output shape array).
Definition: ailayer_reshape.h:51
ailayer_t base
Inherited field members from general ailayer struct.
Definition: ailayer_reshape.h:43
uint16_t * output_shape
Target shape for reshape operation.
Definition: ailayer_reshape.h:53
AIfES layer interface.
Definition: aifes_core.h:252
A tensor in AIfES.
Definition: aifes_math.h:89