Robotsystem of the Robot Group Leipzig: Layer Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Layer Class Reference

`#include <multilayerffnn.h>`

Inherits Storeable.

Inheritance diagram for Layer:

[legend]
Collaboration diagram for Layer:

[legend]
List of all members.

## Public Member Functions
| Layer (int size, double factor_bias=0.1, ActivationFunction actfun=FeedForwardNN::linear)
| constructor for Layer.
| Layer (int size, double factor_bias, ActivationFunction actfun, ActivationFunction dactfun)
| obsolete, use the other constructor for Layer.
bool | store (FILE *f) const
| stores the layer binary into file stream
bool | restore (FILE *f)
| restores the layer binary from file stream
void | setActFun (ActivationFunction actfun)
| sets the activation function of the layer
## Public Attributes
int | size
double | factor_bias
ActivationFunction | actfun
| callback activation function
ActivationFunction | dactfun
| first derivative of the activation function
InvActivationFunction | invactfun
| inversion of activation function
## Friends
std::ostream & | operator<< (std::ostream &, const Layer &)

## Constructor & Destructor Documentation

Layer | ( | int | size,
|  | double | factor_bias = `0.1`,
|  | ActivationFunction | actfun = `FeedForwardNN::linear` |
| ) |  |  |

constructor for Layer.

The derivative and inverse of activation function is derived automatically.

Parameters:

  | size | number neurons
  | factor_bias | size of bias neuron , if 0 no bias is used
  | actfun | activation function. see also FeedForwardNN

Layer | ( | int | size,
|  | double | factor_bias,
|  | ActivationFunction | actfun,
|  | ActivationFunction | dactfun |
| ) |  |  | `[inline]`

obsolete, use the other constructor for Layer.

Parameters:

  | size | number neurons
  | factor_bias | size of bias neuron , if 0 no bias is used
  | actfun | activation function. see also FeedForwardNN
  | dactfun | derivative of activation function (should be consistent with actfun)

## Member Function Documentation

bool restore | ( | FILE * | f | ) | `[virtual]`

restores the layer binary from file stream

Implements Storeable.

void setActFun | ( | ActivationFunction | actfun | ) |

sets the activation function of the layer

bool store | ( | FILE * | f | ) | const`[virtual]`

stores the layer binary into file stream

Implements Storeable.

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | str,
|  | const Layer & | l |
| ) |  |  | `[friend]`

## Member Data Documentation

ActivationFunction actfun

callback activation function

ActivationFunction dactfun

first derivative of the activation function

double factor_bias

InvActivationFunction invactfun

inversion of activation function

int size

The documentation for this class was generated from the following files:

- multilayerffnn.h
- multilayerffnn.cpp