Wiki: Lesson 1


(Agajan Torayev) #207

They did not ask any verification. I just followed this https://github.com/reshamas/fastai_deeplearn_part1/blob/master/tools/paperspace.md

And you can use FASTAI15 credit code for paperspace. For me it took about 5-7 minutes.


(Vikas Bahirwani) #208

Thank you


(Vikas Bahirwani) #209

When you say “Train” your own model - how do we do this? Is there a setting to “not use the pretrained model”?


(Daniel_D) #210

Anybody knows where the data folder is in here https://github.com/fastai/fastai/tree/master/courses/dl1?
I am not able to run the examples.


(Dov Grobgeld) #211

I’ve been trying to run lesson1-rxt50.ipynb on my own hardware, a i7-6700K box, with 16GB of memory and an GTX1070 graphics card. I’m running Fedora Linux 27. I have installed CUDA-9, the latest version of CudNN and installed PyTorch from git. To run the notebook on my CPU I had to reduce the batch size, and then the network fitted inside the 8GB of GPU memory. When running the network, the irst few steps of the work fine, and I can see the improvement of the error rate. But, while the network is running, my CPU (not GPU) memory is constantly increasing. In the last learning step, when the whole network is unfrozen, and we try to learn by three different learning rates, the virtual memory of the process reaches more than 50GB, and eventually the system freezes, and needs to be rebooted.

Does anyone know whether this is “normal” and should I just buy more RAM, a configuration issue, or is this a memory leak in pytorch?


(Agajan Torayev) #212

Sorry, for confusion. I mean training our own data. So far I do not know about fastai library documentation.


(Ismaël Koné) #213

Hi @vikasbahirwani,
sorry for the delay.
Yes, you got the point about precomputed activations.
Concerning the pretrained weights w, it is also correct.


(Ismaël Koné) #214

This models folder is where are located models that you saved using:
learn.save('my_model_name')
So if you don’t run the above instruction you won’t see anything there.
And also when you call:
learn.load('my_model_name')
The load method looks for the your ‘my_model_name’ model in the “models” folder.

Pretrained models are located elsewhere.
This is a nice default that comes up the Fastai library, every model trained on a specific data set is saved by default in a subfolder of the data folder named models.


(Ismaël Koné) #215

It’s a great exercise that allows you to go through all the steps from finding data, cleaning them, organize them and finally train them.
Concerning the number, you must experiment but always start small and increase.
About overfitting, it depends you figure out whether it is overfitting or underfitting or good by looking at the different losses.
Also it’s a good idea to experiment different architecture: resnext50, denset, …


Study Group for Fast AI Part 1 Version 2 (Seattle area or online?)
(Vikas Bahirwani) #216

Thank you. I am glad you helped. I was stuck mentally and could not move forward without closure.


(Vikas Bahirwani) #217

Excellent input. This makes more sense.


(Vikas Bahirwani) #218

Quick follow up: Do you know where the ‘pretrained’ models are located. and is there a way to not use pretrained weights (just to experiment)


(Kishore P. V.) #220

You have a typo. It is used to get stat about GPU, not the CPU.


(Kishore P. V.) #221

In the original paper the authors train on multiple epochs with learning rate varying linearly from low to high. And, they train on train data and in the plot (validation accuracy vs learning rate) they calculate accuracy on the validation data.


(Kishore P. V.) #222

You are asking to return M numbers (say 30) out of m numbers (say 20) without replacement (i.e. only unique ones), which is not possible unless you allow duplicates.


(Pooja) #223

hi . I am getting this error again and again
error: /io/opencv/modules/imgproc/src/color.cpp:11079: error: (-215) scn == 3 || scn == 4 in function cvtColor
what does it mean and how can I solve it


(Daniel Hunter) #224

Can you be a little more specific? What line of code causes the error? I believe you are trying to convert color spaces (RGB to Gray I imagine), and the image you’re passing in is incorrect.


(Pooja) #225

actually I am trying to run the lesson-2_image_model.ipynb using colaboratory but I am getting this error when I am running the code
lrf = learn.lr_find()
and also after ths line of code I am getting the same error in all the other lines of code after it.


(April Teng) #226

Has anyone tried to create paperspace machine from Tokyo Japan saw the error message of no available public IP from your region from the Website?
Please let me know how you dealt with the problem.
many thanks!!


(Atul Krishna Singh) #227

For getting started with " colaboratory and fastai " you can follow this blog as I have successfully done this.
[http://theailearner.com/2018/03/10/free-gpu-for-fast-ai-on-google-colab/]