FraPochetti
(Francesco Pochetti)
1
I am a Callbacks newbie; I followed the great intro to Callbacks by @lgvaz and I am not sure why the on_batch_end
does not print anything.
class PrintCallback(Callback):
def on_batch_end(self): print('After batch')
def after_epoch(self): print('After epoch')
def begin_fit(self): print('Beginning fit')
learn = cnn_learner(dls, resnet34, metrics=accuracy, cbs=PrintCallback())
learn.fit_one_cycle(1, lr_max=1e-2)

What am I missing?
Thanks!
lgvaz
(Lucas Goulart Vazquez)
2
I don’t think there is a on_batch_end
callback, maybe try after_batch
.
You can check the available callbacks here
FraPochetti
(Francesco Pochetti)
3
Thanks for the reply!
What is this one then?
FraPochetti
(Francesco Pochetti)
5
Ah! Am I looking at the wrong docs?
FraPochetti
(Francesco Pochetti)
6
Great! after_batch
works, thanks!
I have literally spent hours trying to debug the wrong code base… 
Pretty amazing experience
1 Like
FraPochetti
(Francesco Pochetti)
7
For context, I am trying to implement a variant of AUC.
This is where all of this is coming from.
1 Like