This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
Neuro/Layer.h

26 lines
486 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 hasBiasNeuron = false;
public:
2015-10-15 20:37:13 +00:00
Layer(size_t numNeurons);
void setOutputValues(const std::vector<double> & outputValues);
void feedForward(const Layer &inputLayer);
double getWeightedSum(int outputNeuron) const;
void connectTo(const Layer & nextLayer);
void updateInputWeights(Layer &prevLayer);
2015-10-18 19:20:37 +00:00
void addBiasNeuron();
size_t sizeWithoutBiasNeuron() const;
};