From 7710efc305682f35cbc8d69d9b1e5739dbb89f0d Mon Sep 17 00:00:00 2001 From: jvech Date: Mon, 24 Jul 2023 20:06:05 -0500 Subject: doc: backpropagation notes added --- src/nn.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/nn.h') diff --git a/src/nn.h b/src/nn.h index 88b4462..05ddd28 100644 --- a/src/nn.h +++ b/src/nn.h @@ -15,12 +15,13 @@ typedef struct Layer { size_t neurons, input_nodes; } Layer; -void nn_layer_init_weights(Layer *layer, size_t nmemb, size_t input_cols); +void nn_layer_init_weights(Layer *layers, size_t nmemb, size_t input_cols); void nn_layer_free_weights(Layer *layer, size_t nmemb); -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 +void nn_layer_forward(Layer layer, double *out, size_t out_shape[2], double *input, size_t input_shape[2]); //TODO +void nn_layer_backward(Layer *layer, double *out, size_t out_shape[2]); //TODO double sigmoid(double x); double relu(double x); +double identity(double x); #endif -- cgit v1.2.3-70-g09d2