README

Start here

Library

Reference

Tutorials

Other

Tips & tricks

Listing event handlers for a callback

Use Base.methods to check what events a callback handles:

methods(FluxTraining.on, (Any, Any, Recorder, Any))
# 5 methods for generic function on:

Visualize the callback dependency graph

You can use GraphPlot.jl to visualize the dependencies between callbacks:

using GraphPlot
gplot(learner.callbacks.graph, nodelabel = learner.callbacks.cbs, layout = stressmajorize_layout)

(the target of an arrow depends on the origin)

As an example for a detected dependency, we can see that Recorder runs after Loss. Recorder records the values of all metrics, so Loss which is a subtype of AbstractMetric needs to run first.