Skip to content

Commit 71dc45b

Browse files
committed
remove controversial println code, and make it shorter
1 parent e4c306b commit 71dc45b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

docs/src/models/quickstart.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ pars = Flux.params(model) # contains references to arrays in model
3131
opt = Flux.Adam(0.01) # will store optimiser momentum, etc.
3232

3333
# Training loop, using the whole data set 1000 times:
34+
losses = []
3435
for epoch in 1:1_000
35-
losses = []
3636
for (x, y) in loader
3737
loss, grad = withgradient(pars) do
3838
# Evaluate model and loss inside gradient context:
@@ -42,9 +42,6 @@ for epoch in 1:1_000
4242
Flux.update!(opt, pars, grad)
4343
push!(losses, loss) # logging, outside gradient context
4444
end
45-
if isinteger(log2(epoch))
46-
println("after epoch $epoch, loss is ", mean(losses))
47-
end
4845
end
4946

5047
pars # parameters, momenta and output have all changed

0 commit comments

Comments
 (0)