I have some values I want to track in the recorder and display in the table for each epoch. How can I add columns to the table and show their values? Right now I made my own recorder and track some values without the fastai recorder, but I feel like this could be improved.
A key thing is that the values I want to recorder are not metrics or losses.
Thanks,
Anthony
Here is my custom recorder right now.
class MyRecorder(Callback):
def try_detach(self, o):
if issubclass(type(o),torch.Tensor): return o.detach().cpu().numpy()
else: return o
def before_fit(self): self.log=[]
def after_step(self):
thingsToGet = ['mean_std', 'mean_mu', 'mean_recons_loss', 'mean_KLD','beta', 'n_iter', 'epoch']
values_to_log = {a:self.try_detach(getattr(self.learn,a, 0)) for a in thingsToGet}
self.log.append(values_to_log)
def to_DataFrame(self): self.df =pd.DataFrame(self.log); return self.df
And here as a gist with better formatting.