From bd74d6e1842eca74ddc2c268ae9f83e43822fc1b Mon Sep 17 00:00:00 2001 From: jvech Date: Thu, 13 Jul 2023 20:54:27 -0500 Subject: add: forward pass with openblas in progress --- src/nn.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/nn.h') 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 #include #include +#include #include #include +#include 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); -- cgit v1.2.3-70-g09d2