aboutsummaryrefslogtreecommitdiff
path: root/src/nn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nn.h')
-rw-r--r--src/nn.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nn.h b/src/nn.h
index fb495bd..4a47e63 100644
--- a/src/nn.h
+++ b/src/nn.h
@@ -4,20 +4,22 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
+#include <string.h>
#include <math.h>
#include <unistd.h>
+#include <openblas/cblas.h>
typedef struct Layer {
double *weights, *bias;
double (*activation)(double x);
- size_t neurons, input_size;
+ size_t neurons, input_nodes;
} Layer;
void nn_layer_init_weights(Layer *layer, size_t nmemb, size_t input_size);
void nn_layer_free_weights(Layer *layer, size_t nmemb);
-double * nn_layer_forward(Layer layer, double *input, size_t input_shape[2]);
-double * nn_layer_backward(Layer layer, double *output, size_t out_shape[2]);
+double * nn_layer_forward(Layer layer, double *input, size_t input_shape[2]); //TODO
+double * nn_layer_backward(Layer layer, double *output, size_t out_shape[2]); //TODO
double sigmoid(double x);
double relu(double x);
Feel free to download, copy and edit any repo