Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NeuralNetwork
- {
- public:
- //Member_Variables
- bool m_init = false;
- NeuronLayer *m_inputs = nullptr;
- NeuronLayer *m_hiddenLayers = nullptr;
- NeuronLayer *m_outputs = nullptr;
- //Static_Member_Variables
- //Methods
- NeuralNetwork();
- NeuralNetwork(int numberOfInputNeuron,int numberOfHiidenNeurons,int numberOfOutputNeuron);
- ~NeuralNetwork();
- int GetNumberOfInputs();
- int GetNumberOfHiddenLayerNeuron();
- int GetNumberOfOutputs();
- void SetRandomWeight();
- void CreateNeuralNetwork(int numberOfInputNeuron, int numberOfHiidenNeurons, int numberOfOutputNeuron);
- void FeedForward(std::vector &inputs);
- void DoBackPropogation(std::vector &knownOutputs);
- void TrainHiddenOutputLayer(std::vector &outputErrors);
- void TrainInputHiddenLayer(std::vector &outputErrors);
- float GetSumOfWeightsInHiddenLayer(int outputIndex);
- void GetOutputs();
- void Update();
- float GetActivationValue(float value);
- float GetFastSigmoidValue(float value);
- float GetFastSigmoidDerivative(float value);
- float GetSigmoidValue(float value);
- void Mutate();
- bool CopyWeightsTo(NeuralNetwork ©);
- void CrossOver(NeuralNetwork &second);
- void StoreToFile(const char* filePathname);
- void LoadFromFile(const char* filePath);
- }
Add Comment
Please, Sign In to add comment