Skip to content

Commit

Permalink
move shuffle into big loop
Browse files Browse the repository at this point in the history
  • Loading branch information
MohHizzani committed May 8, 2020
1 parent 14dc52e commit 9f0aa0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parallelBackForProp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9f0aa0c

Please sign in to comment.