Neuro/Neuron.h

26 lines
623 B
C
Raw Normal View History

#pragma once
#include <vector>
class Neuron
{
private:
double outputValue;
std::vector<double> outputWeights;
double gradient;
public:
2015-03-24 12:45:38 +00:00
Neuron(double value = 1.0);
void setOutputValue(double value);
static double transferFunction(double inputValue);
static double transferFunctionDerivative(double inputValue);
void feedForward(double inputValue);
2015-03-24 12:45:38 +00:00
double getWeightedOutputValue(unsigned int outputNeuron) const;
void createRandomOutputWeights(unsigned int numberOfWeights);
double getOutputValue() const;
void calcOutputGradients(double targetValue);
//void calcHiddenGradients(const Layer &prevLayer);
};