I’m trying to write callback to visualize the predictions
of the validation set during training (in a way not provided by existing options such as wandb). I find from this thread and the Learner docs that get_preds
is the way to do this, and earlier threads seem to have a lot of instances of “that doesn’t apply to v2 anymore”, so…
Right now my little callback only does this much…
class VizPreds(Callback):
def before_train(self, **kwargs): print(f"{len(self.dls.valid.items)} items in validation dataset")
def after_epoch(self, **kwargs):
print("Epoch ended, starting predition")
preds,targs = self.learn.get_preds()
print(f"{len(preds)} items predicted")
…but it never completes. Even on a run with learn.fine_tune(1)
, I just see my text “Epoch ended, starting prediction” print over and over and over. It seems to be caught in an endless loop.
How do we check out our predictions during Training? I don’t see this in the Predictions callbacks (there’s only one routine listed), or in the Data callbacks, … I wasn’t sure if this was a “progress” thing, so I checked Progress callbacks too…
Stuck. Any help? Thanks.