aboutsummaryrefslogtreecommitdiff
path: root/src/nn.h
diff options
context:
space:
mode:
authorjvech <jmvalenciae@unal.edu.co>2023-08-06 09:54:55 -0500
committerjvech <jmvalenciae@unal.edu.co>2023-08-06 09:54:55 -0500
commit01e3a565780ff27c9acfe85d383f4e3ae5e0e349 (patch)
treebb105d936675db9671b2ecf5f19350837f9efe3a /src/nn.h
parent1ec97406e56b0668f035948203e2fe8e7c230dc7 (diff)
refactor: Activation and Layer struct refactored
Diffstat (limited to 'src/nn.h')
-rw-r--r--src/nn.h8
1 files changed, 6 insertions, 2 deletions
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 <unistd.h>
#include <openblas/cblas.h>
+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;
Feel free to download, copy and edit any repo