Workshop DogsCats

I have tried many things but couldn’t figure the problem out. Yesterday when I ran the notebook locally there was no problem. Today I am using paperspace machine and os.mkdirs doc says that some operating systems act diffrently. But still I have no clue. Appreciate your help thanks

I’m making changes at the moment - looks like you did a git pull so you have some new stuff. That particular issue requires a new crestle feature that was just added yesterday, so you’ll need to create a new crestle instance to get this working.

(If you’re not using crestle, you don’t need to use any of those lines - you can just link directly to wherever you download the data to.)

1 Like

Thanks for the reply. I am using paperspace and running jupyter notebook through that machine. What I did was, I’ve cloned fastai repo, then inside courses/dl1 I’ve downloaded and unzipped data/dogcats.

Since we are first learning from top to bottom I didn’t went through the library and explore each functionality. But I am really curious about the need of /cache/tmp for ConvLearner.pretrained(…,data) to work where my data PATH is data/dogscats which I’ve unzipped after downloading directly from the link : http://files.fast.ai/data/dogscats.zip

It seems like after running the pretrained model it tries to write something to data/dogscats/tmp which I fail to create to begin with. So would it be ok if I manually create an empty /tmp file inside data/dogscats then run the model ?

Edit: Creating an empty /tmp dir seems to work but still don’t understand the need of /cache/tmp.

Thanks

Yup the /cache thing is a special requirement only for crestle.

1 Like

Hello,

I have a question about ConvLearner.pretrained object and fit() method .

Are the above statements true for correct usage in general:

  • ConvLearner.pretrained(CNNmodel, data, precompute=False): Creates an object as a CNN, which has last layer of FC modified by data(output size) and CONV + FC weights initialized based on this loaded CNNmodel. By default it returns a learn object which we can apply fit only on FC layers.

## Create a learn object with pretrained weights learn = ConvLearner.pretrained(model , data, precompute = True)

## Allow model to train both Conv and FC weights
## Fit model & updated weights stored in learn object learn.fit()

## freeze to just train FC learn.freeze()

## save model learn.save()

After this every time learn.fit is called it keeps training with latest weights but by only updating FC.

Thanks

If you go down towards the end of the notebook there’s a step by step description. We’ll be covering it in detail in our first lesson.

1 Like