(try): stochastic gradient decent

This commit is contained in:
Jakob Stornig 2023-09-23 22:05:55 +02:00
parent 86ac3e855c
commit 34a23c6eab
7 changed files with 288 additions and 27 deletions

22
neural_net.h Normal file
View file

@ -0,0 +1,22 @@
//
// Created by jakob on 22.09.2023.
//
#include "matrix.h"
#include "image.h"
#ifndef C_NET_NEURAL_NET_H
#define C_NET_NEURAL_NET_H
#endif //C_NET_NEURAL_NET_H
typedef struct {
int layer_count;
int* sizes;
Matrix ** weights;
Matrix ** biases;
} Neural_Network;
Neural_Network* create_network(int layer_count,...);
Matrix * feedforward(Neural_Network * net, Matrix * activations);
void train_network_with_batches(Neural_Network * network, Image** training_data, int image_count, int epochs, int batch_size, double learning_rate);