Browse Source

Factor out config.h

rexim 3 years ago
parent
commit
8d6c4fd70c
2 changed files with 12 additions and 6 deletions
  1. 11 0
      config.h
  2. 1 6
      main.c

+ 11 - 0
config.h

@@ -0,0 +1,11 @@
+#ifndef CONFIG_H_
+#define CONFIG_H_
+
+#define WIDTH 50
+#define HEIGHT 50
+#define PPM_SCALER 25
+#define BIAS 10.0
+#define SAMPLE_SIZE 2000
+#define TRAIN_PASSES 2000
+
+#endif // CONFIG_H_

+ 1 - 6
main.c

@@ -8,12 +8,7 @@
 #include <limits.h>
 #include <float.h>
 
-#define WIDTH 50
-#define HEIGHT 50
-#define PPM_SCALER 25
-#define BIAS 10.0
-#define SAMPLE_SIZE 2000
-#define TRAIN_PASSES 2000
+#include "./config.h"
 
 typedef float Layer[HEIGHT][WIDTH];