| AIfES 2 2.0.0

Data Structures | Typedefs | Functions | Variables
ailayer_input.h File Reference

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...

## Detailed Description

Base layer implementation of the Input layer.

Version
  2.2.0

Copyright
  Copyright (C) 2020-2023 Fraunhofer Institute for Microelectronic Circuits and Systems. All rights reserved.
  AIfES is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
  You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

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.

## Function Documentation

## ◆ ailayer_input()

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()).

Parameters

  *layer | The layer to initialize.

Returns
  Pointer to the (successfully) initialized general layer structure (ailayer_input.base).

## ◆ ailayer_input_backward()

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.

Parameters

  *self | Layer to 'calculate' the backward pass for.

## ◆ ailayer_input_calc_result_shape()

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.

Parameters

  *self | Layer to calculate the resulting shape for.

## ◆ ailayer_input_forward()

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.

Parameters

  *self | Layer to 'calculate' the forward pass for.

## ◆ ailayer_input_print_specs()

void ailayer_input_print_specs | ( | const ailayer_t * | self | ) |

Print the layer specification.

Parameters

  *self | The layer to print the specification for

## Variable Documentation

## ◆ ailayer_input_type

const aicore_layertype_t* ailayer_input_type
| 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.