From 01e3a565780ff27c9acfe85d383f4e3ae5e0e349 Mon Sep 17 00:00:00 2001 From: jvech Date: Sun, 6 Aug 2023 09:54:55 -0500 Subject: refactor: Activation and Layer struct refactored --- src/nn.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/nn.h') diff --git a/src/nn.h b/src/nn.h index 13b5f7c..0c794b5 100644 --- a/src/nn.h +++ b/src/nn.h @@ -10,10 +10,14 @@ #include #include +struct Activation { + double (*func)(double); + double (*dfunc)(double); +}; + typedef struct Layer { double *weights, *bias; - double (*activation)(double x); - double (*activation_derivative)(double x); + struct Activation activation; size_t neurons, input_nodes; } Layer; -- cgit v1.2.3-70-g09d2