We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4c306b commit 71dc45bCopy full SHA for 71dc45b
docs/src/models/quickstart.md
@@ -31,8 +31,8 @@ pars = Flux.params(model) # contains references to arrays in model
31
opt = Flux.Adam(0.01) # will store optimiser momentum, etc.
32
33
# Training loop, using the whole data set 1000 times:
34
+losses = []
35
for epoch in 1:1_000
- losses = []
36
for (x, y) in loader
37
loss, grad = withgradient(pars) do
38
# Evaluate model and loss inside gradient context:
@@ -42,9 +42,6 @@ for epoch in 1:1_000
42
Flux.update!(opt, pars, grad)
43
push!(losses, loss) # logging, outside gradient context
44
end
45
- if isinteger(log2(epoch))
46
- println("after epoch $epoch, loss is ", mean(losses))
47
- end
48
49
50
pars # parameters, momenta and output have all changed
0 commit comments