Open hv10 opened 1 year ago
Oh! I found the solution for now. I have to give in the data when the learner is constructed, so do:
learner = Learner(model, loss; optimizer=opt, callbacks=[ToGPU()], usedefaultcallbacks=true, data=(dl, dl_val))
FluxTraining.fit!(learner, epochs)
# where dl, dl_val are both Flux.DataLoader objects
Somehow non-intuitive.
Hi Noel!
You can print the callbacks on a Learner
using learner.callbacks.cbs
, in case you want to check if one is there.
There are two ways of passing in data:
Learner(...; data =...)
fit!(learner, epochs, dl)
Are you saying that in the latter case, the ProgressPrinter
does not work?
Yes, exactly that. :)
When constructing in the first way the ProgressPrinter
works as expected, in the second case it does only print epoch, phase and some dots (as expected when ProgressPrinter
got initialized with nothing
on construction of the learner).
It seems like this line does not work as I would expect it to.
https://github.com/FluxML/FluxTraining.jl/blob/f53541f57c91d727387df1d32b8e7e60415a8da0/src/callbacks/callbacks.jl#L20
It seems like it always returns nothing
, in the case where data is passed to .fit!()
Will look into it and let you know. Thanks for reporting the issue 👍
Hi first off: wonderful package :)
I have some issues with the ProgressPrinter not showing up even when using the defaultcallbacks.
Do I need to do something specific when constructing the Learner which I have missed? From the code it seems like I would need to give it a Progress object, do I have to construct that myself? What requirements does my data-iterator have to fullfill to show up with the defaultcallbacks?