Neuro/Layer.h

29 lines
584 B
C
Raw Normal View History

#pragma once
#include <vector>
#include "Neuron.h"
class Layer : public std::vector < Neuron >
{
2015-10-18 19:20:37 +00:00
private:
bool m_hasBiasNeuron = false;
2015-10-18 19:20:37 +00:00
public:
2015-10-15 20:37:13 +00:00
Layer(size_t numNeurons);
void setOutputValues(const std::vector<double> & outputValues);
2015-10-27 14:33:10 +00:00
void setOutputValues(const double *outputValues);
void feedForward(const Layer &inputLayer);
double getWeightedSum(size_t outputNeuron) const;
void connectTo(const Layer & nextLayer);
void updateInputWeights(Layer &prevLayer);
2015-10-18 19:20:37 +00:00
void addBiasNeuron();
bool hasBiasNeuron() const;
2015-10-18 19:20:37 +00:00
size_t sizeWithoutBiasNeuron() const;
};