aboutsummaryrefslogtreecommitdiff
path: root/include/weights.h
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2021-03-16 22:19:17 -0400
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commit93387bf4b0cf54f8a84b13d4ad4751e7ef81a788 (patch)
treefff5eddcd1fb11c65c611977de2aba7bab27a9c3 /include/weights.h
parent00a04c2929bdc8f8f4bf7d5d8cf413ebfb3cd006 (diff)
Snapshot: AMMEND ME
Diffstat (limited to 'include/weights.h')
-rw-r--r--include/weights.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/weights.h b/include/weights.h
index f736198..3d655e5 100644
--- a/include/weights.h
+++ b/include/weights.h
@@ -24,11 +24,17 @@
#define KERN_OSIZE (5-KERN_SIZE+1) // 5
#define CONV_NUM (KERN_NUM * KERN_OSIZE * KERN_OSIZE) // 108
-extern const float conv2d_weights[KERN_NUM][KERN_SIZE][KERN_SIZE][KERN_CHAN];
-extern const float conv2d_biases[KERN_NUM];
-extern const float dense1_weights[DENSE1_NUM][CONV_NUM+2];
-extern const float dense1_biases[DENSE1_NUM];
-extern const float dense2_weights[DENSE2_NUM][DENSE1_NUM];
-extern const float dense2_biases[DENSE2_NUM];
-extern const float output_weights[DENSE2_NUM];
-extern const float output_bias;
+#define NUM_PARAMETERS \
+(KERN_NUM * KERN_SIZE * KERN_SIZE * KERN_CHAN + KERN_NUM \
+ + DENSE1_NUM * (CONV_NUM + 2) + DENSE1_NUM \
+ + DENSE2_NUM * DENSE1_NUM + DENSE2_NUM \
+ + DENSE2_NUM + 1)
+
+extern float conv2d_weights[KERN_NUM][KERN_SIZE][KERN_SIZE][KERN_CHAN];
+extern float conv2d_biases[KERN_NUM];
+extern float dense1_weights[DENSE1_NUM][CONV_NUM+2];
+extern float dense1_biases[DENSE1_NUM];
+extern float dense2_weights[DENSE2_NUM][DENSE1_NUM];
+extern float dense2_biases[DENSE2_NUM];
+extern float output_weights[DENSE2_NUM];
+extern float output_bias;