Skip to content

Commit 8a12b3a

Browse files
committed
smaller clip norm
1 parent 4d09e3f commit 8a12b3a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎examples/usage.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ icnf = ICNF(;
6666
)
6767

6868
## Fit It
69-
using DataFrames, MLJBase, Zygote, ADTypes, OptimizationOptimisers
69+
using DataFrames, MLJBase, Zygote, SciMLLogging, ADTypes, OptimizationOptimisers
7070

7171
function opt_callback(state::Any, l::Any)
7272
if isone(state.iter % 64) # log the loss at each 64 iterations
@@ -87,7 +87,7 @@ if !isfile(icnf_mach_fn)
8787
callback = opt_callback,
8888
alg = OptimiserChain(
8989
WeightDecay(; lambda = 1.0e-4),
90-
ClipNorm(10.0, 2.0; throw = true),
90+
ClipNorm(1.0, 2.0; throw = true),
9191
Adam(; eta = 0.001, beta = (0.9, 0.999), epsilon = 1.0e-8),
9292
),
9393
progress = true,

‎src/exts/mlj_ext/core_cond_icnf.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function CondICNFModel(;
1717
alg = Optimisers.OptimiserChain(
1818
Optimisers.WeightDecay(; lambda = convert(eltype(icnf), 1.0e-4)),
1919
Optimisers.ClipNorm(
20-
convert(eltype(icnf), 10.0),
20+
convert(eltype(icnf), 1.0),
2121
convert(eltype(icnf), 2.0);
2222
throw = true,
2323
),

‎src/exts/mlj_ext/core_icnf.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function ICNFModel(;
1717
alg = Optimisers.OptimiserChain(
1818
Optimisers.WeightDecay(; lambda = convert(eltype(icnf), 1.0e-4)),
1919
Optimisers.ClipNorm(
20-
convert(eltype(icnf), 10.0),
20+
convert(eltype(icnf), 1.0),
2121
convert(eltype(icnf), 2.0);
2222
throw = true,
2323
),

0 commit comments

Comments
 (0)