From 0e610b056dbcd85affa23f64f9f8da4d197f110a Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Thu, 08 Sep 2016 05:46:10 +0000
Subject: [PATCH] and again

---
 src/connected_layer.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/connected_layer.c b/src/connected_layer.c
index 623e6c8..b4ced2d 100644
--- a/src/connected_layer.c
+++ b/src/connected_layer.c
@@ -187,7 +187,7 @@
 {
     int i, j;
     for(i = 0; i < l.outputs; ++i){
-        float scale = l.scales[i]/sqrt(l.rolling_variance[i] + .00001);
+        float scale = l.scales[i]/sqrt(l.rolling_variance[i] + .000001);
         for(j = 0; j < l.inputs; ++j){
             l.weights[i*l.inputs + j] *= scale;
         }
@@ -198,6 +198,23 @@
     }
 }
 
+
+void statistics_connected_layer(layer l)
+{
+    if(l.batch_normalize){
+        printf("Scales ");
+        print_statistics(l.scales, l.outputs);
+        printf("Rolling Mean ");
+        print_statistics(l.rolling_mean, l.outputs);
+        printf("Rolling Variance ");
+        print_statistics(l.rolling_variance, l.outputs);
+    }
+    printf("Biases ");
+    print_statistics(l.biases, l.outputs);
+    printf("Weights ");
+    print_statistics(l.weights, l.outputs);
+}
+
 #ifdef GPU
 
 void pull_connected_layer(connected_layer l)

--
Gitblit v1.10.0