From a599ccd2172c159cb690a8b446bb4b3986d594fb Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Fri, 8 Nov 2013 21:47:44 -0500 Subject: [PATCH] stupid uninitialized variable in the mlp training caught by cppcheck --- src/mlp_train.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mlp_train.c b/src/mlp_train.c index 2e9568ba..769f503d 100644 --- a/src/mlp_train.c +++ b/src/mlp_train.c @@ -121,8 +121,6 @@ double compute_gradient(MLPTrain *net, float *inputs, float *outputs, int nbSamp double netOut[MAX_NEURONS]; double error[MAX_NEURONS]; - for (i=0;itopo; inDim = net->topo[0]; hiddenDim = net->topo[1]; @@ -135,6 +133,8 @@ double compute_gradient(MLPTrain *net, float *inputs, float *outputs, int nbSamp memset(W1_grad, 0, W1_size*sizeof(double)); for (i=0;i