Start devloping vulkan

This commit is contained in:
2026-04-29 21:08:19 +07:00
parent c02a886327
commit 1a05d3a6d9
10 changed files with 70 additions and 37 deletions
+25
View File
@@ -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