Learner.save('name') where?

I’ve looked here on the forums and on the web but I can’t come up with an answer to what must be a dumb question: When I use learner.save('name') where is name saved? I’ve looked around all the folders in the console and can’t find anything. The save function has a path argument but that’s something I’m passing in.

Thanks!

1 Like

In a directory named models in your datapath. For example: data/dogcats/models

Thanks very much!

Alternatively, You can also specify where the model weights should be saved as a parameter (model_dir) in your method. ( cnn_learner)

projpath = Path("./input")
learn = cnn_learner(data, models.resnet34, metrics=error_rate,model_dir=projpath)

I found this option helpful when using fastai on kaggle, since the project workspace is READONLY. ( kaggle does not allow you to write this pretrained model into the images directory , which is in the workspace.)

1 Like