We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dc709c commit 3db4013Copy full SHA for 3db4013
src/FullyConnected.jl
@@ -68,6 +68,10 @@ end
68
# Define a container to hold any optimiser specific parameters (if any):
69
struct ConvexRule <: Flux.Optimise.AbstractOptimiser
70
rule::Flux.Optimise.AbstractOptimiser
71
+ tol::Real
72
+end
73
+function ConvexRule(rule::Flux.Optimise.AbstractOptimiser; tol=1e-6)
74
+ return ConvexRule(rule, tol)
75
end
76
77
"""
@@ -113,7 +117,7 @@ function MLJFlux.train!(
113
117
return batch_loss
114
118
115
119
Flux.update!(optimiser.rule, parameters, gs)
116
- make_convex!(chain)
120
+ make_convex!(chain; tol=optimiser.tol)
121
122
return training_loss / n_batches
123
0 commit comments