A layer in a NeuralNet.
More...
#include <Layer.h>
Initialize a layer with the default sigmoid activation function.
Layer::Layer |
( |
std::ifstream * |
input | ) |
|
|
explicit |
Initialize a layer from a saved text file.
The saved text file must be formatted as outputted by the storeNetWithStream(std::ofstream *output) function.
- Parameters
-
input | the text file for the Layer object to be initialized from |
std::string Layer::getActivationFunctionName |
( |
| ) |
|
Gets the name of the layer's activation function.
static std::map<std::string, ActivationFunction> net::Layer::getActivationFunctionNameMap |
( |
| ) |
|
|
inlinestatic |
Gets the map of activation function name to ActivationFunction.
static std::map<std::string, ActivationFunction> net::Layer::getDerivedActivationFunctionNames |
( |
| ) |
|
|
inlinestatic |
Gets the map of activation function name to a derived ActivationFunction.
void Layer::setActivationFunctionWithName |
( |
std::string |
name | ) |
|
Sets the activation function to the given string.
- Parameters
-
name | the name of the activation function |
void Layer::store |
( |
std::ofstream * |
output | ) |
|
Store the layer to a text file.
This can later be read by the Layer(std::ifstream *input) constructor.
- Parameters
-
output | the text file for the layer object to be written to |
The activation function for the neurons of this layer.
An activation function takes the summation of the inputs times the weights of a neuron and uses an activation value of 0 to filter the output
std::vector<Neuron> net::Layer::neurons |
Holds the neurons of this layer.
The documentation for this class was generated from the following files:
- /home/truell20/Documents/Fido/Fido/include/Layer.h
- /home/truell20/Documents/Fido/Fido/src/Layer.cpp