Start devloping vulkan
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef CORE_H
|
||||
#define CORE_H
|
||||
|
||||
#include "typedef.hpp"
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
class NeuralNetwork {
|
||||
private:
|
||||
int numLayers;
|
||||
std::vector<int> sizes;
|
||||
std::vector<std::vector<std::vector<double>>> weights;
|
||||
std::vector<std::vector<double>> biases;
|
||||
std::vector<std::vector<double>> outputs;
|
||||
|
||||
double sigmoid(double x) { return 1.0 / (1.0 + exp(-x)); }
|
||||
double sigmoidDeriv(double x) { return x * (1.0 - x); }
|
||||
|
||||
public:
|
||||
NeuralNetwork(LayerStructure_t layers[], int count);
|
||||
std::vector<double> feedForward(const std::vector<double>& input);
|
||||
double train(const std::vector<double>& input, const std::vector<double>& target, double lr);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user