For me it is a quite general thing, because I face it so often. Therefore I thought, that I´m not the only one, who faced it. But here one example, the following code lead to this error message during debbuging
Juno.@enter Flux.train!(loss, ps, data, opt)
debug> ERROR: UndefVarError: progress not defined
using Flux
feat = 6
batch_size = 256
num_batches = 100
seq_len = 20
X = [[rand(Float32, feat, batch_size) for i in 1:seq_len] for batch in 1:num_batches];
Y = [rand(Float32, batch_size, seq_len) ./ 10 for batch in 1:num_batches];
gpu_or_cpu = gpu
X = X |> gpu_or_cpu;
Y = Y |> gpu_or_cpu;
data = zip(X, Y);
opt = ADAM(0.001, (0.9, 0.999))
function loss(X,Y)
Flux.reset!(model)
mse_val = sum(abs2.(Y .- Flux.stack(model.(X), 2)))
return mse_val
end
model = Chain(LSTM(6, 70), LSTM(70, 70), LSTM(70, 70), Dense(70, 1, relu)) |> gpu_or_cpu
ps = Flux.params(model)
Flux.reset!(model)
@time Flux.train!(loss, ps, data, opt)