From 9f0aa0c0e512411784400ddbbc3a28c6f6f2244c Mon Sep 17 00:00:00 2001 From: Mohammad Hizzani Date: Fri, 8 May 2020 17:44:13 +0300 Subject: [PATCH] move shuffle into big loop --- src/parallelBackForProp.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parallelBackForProp.jl b/src/parallelBackForProp.jl index 0758666..aef63d1 100644 --- a/src/parallelBackForProp.jl +++ b/src/parallelBackForProp.jl @@ -560,7 +560,7 @@ function train( m = size(X_train)[end] c = size(Y_train)[end-1] nB = m รท batchSize - shufInd = randperm(m) + N = ndims(X_train) axX = axes(X_train)[1:end-1] axY = axes(Y_train)[1:end-1] @@ -592,6 +592,7 @@ function train( Accuracies = [] Costs = [] for i=1:epochs + shufInd = randperm(m) minCosts = [] #the costs of all mini-batches minAcc = [] for j=1:nB