How to extract scores from learn.fit_one_cycle from the saved files?

I am running an Unet model on server instead on the Jupyter notebook. In the notebook, I can easily see my accuracy, loss scores for every epoch. But, how can extract these scores from the saved model on a server?

learn.fit_one_cycle(5, slice(lr), pct_start=0.9)

you can save them in a csv with CSVLogger

Something like this?

callback_fns=[CSVLogger])
learn.fit_one_cycle(5, slice(lr), pct_start=0.9)
learn.csv_logger.read_logged_file()

well you have to pass callback_fns into the Learner. But apart from that this code should work.

Yeah, I missed that. Thanks

learn = unet_learner(data, models.resnet34, metrics=dice, callback_fns=[CSVLogger])
learn.fit_one_cycle(5, slice(lr), pct_start=0.9)
learn.csv_logger.read_logged_file()

Yep that should work.

It throws the following error

name 'CSVLogger' is not defined

from fastai.callbacks import *

1 Like

That works. thanks.

1 Like