This PR uses the new log_arrays! Lighthouse logging interface function in order to log out weights and gradients during the course of training. The default for log_arrays! is to simply log the means, but that is up to the logger to implement based on what they can accomodate.
Functors.jl provides an @functor macro which is the way Flux models declare their structure. This defines a children function to walk the model. We use that here in order to find the weights and gradients to log.
Needs Lighthouse v0.14.6 and tests!This PR uses the new
log_arrays!
Lighthouse logging interface function in order to log out weights and gradients during the course of training. The default forlog_arrays!
is to simply log the means, but that is up to the logger to implement based on what they can accomodate.This uses a function
fforeach_keys
which I based onFunctors.fmap
, and discussed here: https://julialang.zulipchat.com/#narrow/stream/238249-machine-learning/topic/.60fmap.60.20with.20keys.3F.Functors.jl provides an
@functor
macro which is the way Flux models declare their structure. This defines achildren
function to walk the model. We use that here in order to find the weights and gradients to log.Closes https://github.com/beacon-biosignals/LighthouseFlux.jl/issues/33 incidentally