AIfES 2
2.0.0
|
Base layer implementation of the Input layer. More...
Go to the source code of this file.
Data Structures | |
struct | ailayer_input |
General Input layer structure. More... | |
Typedefs | |
typedef struct ailayer_input | ailayer_input_t |
Functions | |
ailayer_t * | ailayer_input (ailayer_input_t *layer) |
Initialize the given Input layer. More... | |
void | ailayer_input_forward (ailayer_t *self) |
Calculate the forward pass for given Input layer. More... | |
void | ailayer_input_backward (ailayer_t *self) |
Calculate the backward pass for the given Input layer. More... | |
void | ailayer_input_calc_result_shape (ailayer_t *self) |
Calculate the shape of the result tensor. More... | |
void | ailayer_input_print_specs (const ailayer_t *self) |
Print the layer specification. More... | |
Variables | |
const aicore_layertype_t * | ailayer_input_type |
Input layer type. More... | |
Base layer implementation of the Input layer.
This is an "abstract" data-type independent implementation. To use the layer use one of the provided implementations for a specific hardware and data-type (for example from ailayer_input_default.h) or set the required math functions on your own.
The Input layer is the start layer for every AIfES 2 model.
ailayer_t* ailayer_input | ( | ailayer_input_t * | layer | ) |
Initialize the given Input layer.
This function represents the "constructor" of the abstract Input layer. It initializes the layer structure and connects it to the previous layer.
This function is not intended to call it directly. Instead use one of the data type specific implementations (like for example ailayer_input_f32_default()).
*layer | The layer to initialize. |
void ailayer_input_backward | ( | ailayer_t * | self | ) |
Calculate the backward pass for the given Input layer.
Implementation of ailayer.backward.
The standard layer interface demands a backward pass function for the net scheduler, but theres no sense in 'calculating' an input layer, so this function returns without doing something.
*self | Layer to 'calculate' the backward pass for. |
void ailayer_input_calc_result_shape | ( | ailayer_t * | self | ) |
Calculate the shape of the result tensor.
Implementation of ailayer.calc_result_shape
As the result shape is given by the configured ailayer_input.input_shape parameter, this function returns without doing anything.
*self | Layer to calculate the resulting shape for. |
void ailayer_input_forward | ( | ailayer_t * | self | ) |
Calculate the forward pass for given Input layer.
Implementation of ailayer.forward.
The standard layer interface demands a forward pass function for the net scheduler, but theres no sense in 'calculating' an input layer, so this function returns without doing something.
*self | Layer to 'calculate' the forward pass for. |
void ailayer_input_print_specs | ( | const ailayer_t * | self | ) |
Print the layer specification.
*self | The layer to print the specification for |
|
extern |
Input layer type.
Defines the type of the layer (for example for type checks and debug prints). See aicore_layertype for more information about the layer type.