CustomCallback
struct defined in module
FluxTraining
CustomCallback(f, Event, [TPhase = Phase, access = (;)])
A callback that runs
f(learner) every time an event of type
Event during a phase of type in
Phase.
If
f needs to access learner state, pass
access, a named tuple in the same form as
stateaccess.
Instead of using
CustomCallback it is recommended to properly implement a
Callback.
We can get a quick idea of when a new epoch starts as follows:
cb
=
CustomCallback
(
learner
->
println
(
"
New epoch!
"
)
,
EpochBegin
)There is
1
method for FluxTraining.CustomCallback:
The following pages link back here:
FluxTraining.jl , callbacks/callbacks.jl , callbacks/custom.jl