Skip to content

Commit 81ff43b

Browse files
committed
fix tutorial
1 parent 916979c commit 81ff43b

File tree

2 files changed

+1
-156
lines changed

2 files changed

+1
-156
lines changed

docs/src/tutorials/warcraft.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ opt_state = Flux.setup(Adam(1e-3), model)
7070
loss_history = Float64[]
7171
for epoch in 1:50
7272
val, grads = Flux.withgradient(model) do m
73-
sum(loss(m(sample.x), sample.y) for sample in train_dataset) / length(train_dataset)
73+
sum(loss(m(x), y_true) for (; x, y_true) in train_dataset) / length(train_dataset)
7474
end
7575
Flux.update!(opt_state, model, grads[1])
7676
push!(loss_history, val)

docs/src/warcraft.md

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)