added feedForward and moving Reccurent neuron to normal
This commit is contained in:
43
include/NeuralNetwork/FeedForward/Layer.h
Normal file
43
include/NeuralNetwork/FeedForward/Layer.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include "../Neuron.h"
|
||||
|
||||
namespace NeuralNetwork {
|
||||
namespace FeedForward {
|
||||
|
||||
/**
|
||||
* @author Tomas Cernik (Tom.Cernik@gmail.com)
|
||||
* @brief Class for Layer of FeedForward network
|
||||
*/
|
||||
class Layer
|
||||
{
|
||||
public:
|
||||
|
||||
~Layer() {};
|
||||
|
||||
/**
|
||||
* @brief This is a virtual function for selecting neuron
|
||||
* @param neuron is position in layer
|
||||
* @returns Specific neuron
|
||||
*/
|
||||
Neuron& operator[](const std::size_t& neuron) {
|
||||
return neurons[neuron];
|
||||
}
|
||||
|
||||
void solve(const std::vector<float> &input, std::vector<float> &output);
|
||||
|
||||
/**
|
||||
* @returns Size of layer
|
||||
*/
|
||||
std::size_t size() {
|
||||
return neurons.size();
|
||||
}
|
||||
|
||||
protected:
|
||||
std::vector<Neuron> neurons;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user