Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Flux with early stop and epochs

$
0
0

I’ve found that Flux provides early stop by using callbacks.

Despite of the instruction, it is not compatible with @epochs in my case.

For example, codes looks like the following keep run the epochs loop.

valid_check = function()
    valid_loss = loss(x_test', θ_test', V_test')
    @show valid_loss
    valid_loss < 0.1 && Flux.stop()
end
@epochs 10 Flux.train!(loss, Flux.params(m), data, opt, cb=Flux.throttle(valid_check, 1))

Anyone knows what I should do…?

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Latest Images

Trending Articles



Latest Images