From d1622c9bba66a55ec181d02d975a6034dc55c1a1 Mon Sep 17 00:00:00 2001 From: DoctorKey Date: Wed, 11 Apr 2018 09:02:20 +0800 Subject: [PATCH] fix make_dropout_layer If you want to resize dropout layer, you may want to realloc inputs*l->batch*sizeof(float). --- src/dropout_layer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dropout_layer.c b/src/dropout_layer.c index 780554fb..25ce98ba 100644 --- a/src/dropout_layer.c +++ b/src/dropout_layer.c @@ -27,7 +27,7 @@ dropout_layer make_dropout_layer(int batch, int inputs, float probability) void resize_dropout_layer(dropout_layer *l, int inputs) { - l->rand = realloc(l->rand, l->inputs*l->batch*sizeof(float)); + l->rand = realloc(l->rand, inputs*l->batch*sizeof(float)); #ifdef GPU cuda_free(l->rand_gpu);