From 0b4c38f631db13e2db18423e9a12ec4885f03b8b Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 31 Jul 2015 05:12:29 +0000
Subject: [PATCH] Set default subdivisions to be larger

---
 src/normalization_layer.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/normalization_layer.c b/src/normalization_layer.c
index dce2fcc..587ece7 100644
--- a/src/normalization_layer.c
+++ b/src/normalization_layer.c
@@ -40,10 +40,10 @@
     layer->out_w = w;
     layer->inputs = w*h*c;
     layer->outputs = layer->inputs;
-    layer->output = realloc(layer->output, h * w * layer->c * layer->batch * sizeof(float));
-    layer->delta = realloc(layer->delta, h * w * layer->c * layer->batch * sizeof(float));
-    layer->squared = realloc(layer->squared, h * w * layer->c * layer->batch * sizeof(float));
-    layer->norms = realloc(layer->norms, h * w * layer->c * layer->batch * sizeof(float));
+    layer->output = realloc(layer->output, h * w * c * batch * sizeof(float));
+    layer->delta = realloc(layer->delta, h * w * c * batch * sizeof(float));
+    layer->squared = realloc(layer->squared, h * w * c * batch * sizeof(float));
+    layer->norms = realloc(layer->norms, h * w * c * batch * sizeof(float));
 #ifdef GPU
     cuda_free(layer->output_gpu);
     cuda_free(layer->delta_gpu); 
@@ -90,6 +90,7 @@
 void backward_normalization_layer(const layer layer, network_state state)
 {
     // TODO This is approximate ;-)
+    // Also this should add in to delta instead of overwritting.
 
     int w = layer.w;
     int h = layer.h;

--
Gitblit v1.10.0