Learner.save('name') where?

(Gary Biggs) #1

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!

0 Likes

#2

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

0 Likes

(Gary Biggs) #3

Thanks very much!

0 Likes

(piby4) #4

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.)

0 Likes