Currently, Learner takes 4 positional arguments plus any number of callbacks as positional arguments. Not the cleanest API, so an additional method, more concise method should be added to construct Learners.
This new method could dispatch to the current method, but should be favored in the documentation. Implementation looks something like:
function Learner(model, lossfn; optim=ADAM(), data=nothing, callbacks=[], kwargs...)
return Learner(model, data, optim, lossfn, callbacks...; kwargs...)
end
This also brings consistency with FastAI.tasklearner, which already takes callbacks as a keyword argument.
Currently,
Learner
takes 4 positional arguments plus any number of callbacks as positional arguments. Not the cleanest API, so an additional method, more concise method should be added to constructLearner
s.This new method could dispatch to the current method, but should be favored in the documentation. Implementation looks something like:
This also brings consistency with
FastAI.tasklearner
, which already takes callbacks as a keyword argument.