diff options
author | jvech <jmvalenciae@unal.edu.co> | 2023-08-06 09:54:55 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2023-08-06 09:54:55 -0500 |
commit | 01e3a565780ff27c9acfe85d383f4e3ae5e0e349 (patch) | |
tree | bb105d936675db9671b2ecf5f19350837f9efe3a /src/nn.h | |
parent | 1ec97406e56b0668f035948203e2fe8e7c230dc7 (diff) |
refactor: Activation and Layer struct refactored
Diffstat (limited to 'src/nn.h')
-rw-r--r-- | src/nn.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |