We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 916979c commit 81ff43bCopy full SHA for 81ff43b
2 files changed
docs/src/tutorials/warcraft.jl
@@ -70,7 +70,7 @@ opt_state = Flux.setup(Adam(1e-3), model)
70
loss_history = Float64[]
71
for epoch in 1:50
72
val, grads = Flux.withgradient(model) do m
73
- sum(loss(m(sample.x), sample.y) for sample in train_dataset) / length(train_dataset)
+ sum(loss(m(x), y_true) for (; x, y_true) in train_dataset) / length(train_dataset)
74
end
75
Flux.update!(opt_state, model, grads[1])
76
push!(loss_history, val)
docs/src/warcraft.md
0 commit comments