warum hab i ka highlighting mehr

This commit is contained in:
Tocuro 2023-09-21 12:48:44 +02:00
parent f18a7714a2
commit a6823bbeeb

View file

@ -170,6 +170,12 @@ Matrix* predict(Neural_Network* network, Matrix* image_data) {
return result;
}
double cost_function(Matrix* calculated, int expected){
calculated->numbers[expected] -= 1;
apply(square, calculated);
}
//void train_network(Neural_Network* network, Matrix* input, Matrix* output);
//void batch_train_network(Neural_Network* network, Image** images, int size);
@ -180,6 +186,10 @@ double relu(double input) {
return input;
}
double relu_derivative(double x) {
return (x > 0) ? 1 : 0;
}
Matrix* softmax(Matrix* matrix) {
double total = 0;