From ae74d0ef31485f84e1856b4733135d2753dbb033 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Sat, 21 Oct 2017 20:56:07 +0000
Subject: [PATCH] Fixed fread() for net->seen

---
 src/network.h |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/src/network.h b/src/network.h
index 66ceb30..693105c 100644
--- a/src/network.h
+++ b/src/network.h
@@ -2,18 +2,26 @@
 #ifndef NETWORK_H
 #define NETWORK_H
 
-#include "image.h"
+#include <stdint.h>
 #include "layer.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "image.h"
 #include "data.h"
+#include "tree.h"
 
 typedef enum {
-    CONSTANT, STEP, EXP, POLY, STEPS, SIG
+    CONSTANT, STEP, EXP, POLY, STEPS, SIG, RANDOM
 } learning_rate_policy;
 
 typedef struct network{
+    float *workspace;
     int n;
     int batch;
-    int *seen;
+	uint64_t *seen;
     float epoch;
     int subdivisions;
     float momentum;
@@ -33,11 +41,25 @@
     float *scales;
     int   *steps;
     int num_steps;
+    int burn_in;
+
+    int adam;
+    float B1;
+    float B2;
+    float eps;
 
     int inputs;
     int h, w, c;
     int max_crop;
     int min_crop;
+    float angle;
+    float aspect;
+    float exposure;
+    float saturation;
+    float hue;
+
+    int gpu_index;
+    tree *hierarchy;
 
     #ifdef GPU
     float **input_gpu;
@@ -49,12 +71,15 @@
     float *truth;
     float *input;
     float *delta;
+    float *workspace;
     int train;
     int index;
     network net;
 } network_state;
 
 #ifdef GPU
+float train_networks(network *nets, int n, data d, int interval);
+void sync_nets(network *nets, int n, int interval);
 float train_network_datum_gpu(network net, float *x, float *y);
 float *network_predict_gpu(network net, float *input);
 float * get_network_output_gpu_layer(network net, int i);
@@ -106,5 +131,9 @@
 int get_network_nuisance(network net);
 int get_network_background(network net);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

--
Gitblit v1.10.0