Skip to content
This repository was archived by the owner on Sep 28, 2024. It is now read-only.

Commit 482119a

Browse files
committed
fallback to last model
1 parent 97772af commit 482119a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

example/DoublePendulum/src/DoublePendulum.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function update_model!(model_file_path, model)
1515
@warn "model updated!"
1616
end
1717

18-
function train(; loss_bounds=[1, 0.3, 0.1, 0.05])
18+
function train(; loss_bounds=[1, 0.2, 0.1, 0.05, 0.02])
1919
if has_cuda()
2020
@info "CUDA is on"
2121
device = gpu
@@ -28,7 +28,6 @@ function train(; loss_bounds=[1, 0.3, 0.1, 0.05])
2828
FourierOperator(6=>64, (16, ), relu),
2929
FourierOperator(64=>64, (16, ), relu),
3030
FourierOperator(64=>64, (16, ), relu),
31-
FourierOperator(64=>64, (16, ), relu),
3231
FourierOperator(64=>6, (16, )),
3332
) |> device
3433

@@ -56,7 +55,7 @@ function train(; loss_bounds=[1, 0.3, 0.1, 0.05])
5655
end
5756
end
5857
call_back = Flux.throttle(validate, 10, leading=false, trailing=true)
59-
58+
6059
Flux.@epochs 50 @time(Flux.train!(loss, params(m), data, opt, cb=call_back))
6160
end
6261

0 commit comments

Comments
 (0)