commit 7d08eb02d8394b83a83313721ff9295e30b6863c
Author: David Freifeld <freifeld.david@gmail.com>
Date: Sun, 7 Jun 2020 11:00:41 -0700
Boilerplate / init commit
Diffstat:
| A | bpnn.c | | | 55 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 55 insertions(+), 0 deletions(-)
diff --git a/bpnn.c b/bpnn.c
@@ -0,0 +1,55 @@
+#include <stdio.h>
+
+#include "../mapreduce/mapreduce.h"
+#include "../mapreduce/server.h"
+#include "../mapreduce/worker.h"
+
+struct node;
+
+struct edge {
+ struct node * source;
+ struct node * target;
+ double weight;
+};
+
+struct node {
+ struct edge * incoming;
+ struct edge * outgoing;
+ float activation;
+};
+
+struct layer {
+ struct node * nodes;
+ int length;
+};
+
+struct network {
+ struct layer* layers;
+ int length;
+};
+
+float activate (float value) {
+
+}
+
+struct network initialize (char* path, int inputs, int neurons, int layers, int outputs) {
+ struct layer input;
+ for (int i = 0; i < 4; i++) {
+ input.nodes[i].activation = 0; // Needs some sort of scaling
+ }
+}
+
+struct int_pair* map (struct str_pair file)
+{
+
+}
+
+struct int_pair* reduce (struct int_pair* input)
+{
+
+}
+
+int main(int argc, char** argv)
+{
+ mapreduce(argv[3], map, reduce, strtol(argv[2], NULL, 10), 50, strtol(argv[1], NULL, 10), 1);
+}