Lesson 1 discussion - beginner

(Jeremy Howard) #1

Use this thread to discuss topics related to lesson 1.

(Faris Baker) #2


When i run the file lesson1.py in Crestle, i receive the following error:

I am in:


How do I fix this issue please?



(Jeremy Howard) #3

First, git pull in the Crestle terminal, in the fastai repo. Then in the notebook, follow the directions in the ‘Crestle’ section.

(Faris Baker) #4

Thanks Jeremy. Sorry, I forgot about that.

(Rahul Sharma) #5

@jeremy Everytime I run the convlearner I get slightly varying results. Sometimes there is an improvement, sometimes a deterioration.

How do we handle such a case ? When do we stop and accept the results.


Hi @jeremy ,
is there a particular reason behind setting 2s delay between loading the pretrained net and fitting it in the notebook(crestle):

learn.fit(0.01, 1)

And I’ve noticed, you do it more than once!
Thank you and excuse me if it is a bit dumb question!

(Faris Baker) #7


Would it be possible to use fastai library (third-party library that is not available in anaconda3) with one’s own CPU/GPU rather than using Crestle or AWS? For example to do this after downloading the library in /Lib directory using Bash:

$mkdir Lib
$cd Lib
$ wget http://…fastailibrary…
$pip install -t /anaconda3/Lib/fastailibrary


(Rahul Sharma) #8

@FarisMBaker I don’t think fastai is available on pip/conda yet, but you can clone the repo on your own machine, and thinks should work.

(Faris Baker) #9

Thanks Rahul. But , sorry i don’t know how to clone the repository. Do i do like this:

$get clone http:// … ???..

what http do I clone? and if i did then , would " from fastai.imports import * " work?

(Rahul Sharma) #10

do “git clone https://github.com/fastai/fastai” in the folder where you want to work.
Put this folder on the path as well.

Are you using windows or linux ?

(Faris Baker) #11

Thanks Rahul, i will try that. I am using ubuntu on windows.

(Rahul Sharma) #12

try this to add the fastai folder to your python path

(Aditya) #13

To give rest to GPU I guess…
Can’t remember exactly what Jeremy said…

(Jeremy Howard) #14

That’s normal. Your screenshot shows about 0.2% up and down - which with 2000 validation set images, is a change in classification of about 4 images. That’s to be expected with a randomized algorithm such as SGD.

(Jeremy Howard) #15

I was having some odd problems with Crestle freezing, and adding those sleep’s helped fix it. I’ve fixed the underlying cause now so if you do a git pull you should be fine to remove them.

(Jeremy Howard) #16

Yes it’s possible, although it’s an advanced extension so would be best discussed on the other forum category (it’s been discussed a few times there already BTW).

(Arjun Rajkumar) #17

I’m trying the dogsVscats again, and getting an error while calculating the log_test_preds

Able to calculate the prediction on the validation set - but getting error while trying on test set.

The test directory has the files and is not empty.

IS there something in Jupyter Notebook for debugging that is similar to Ruby’s binding.pry
It would be helpful if I could see the actual values inside data.test_dl and data.test_aug_dl to see if they are nil or not.


You can use pdb for debugging. Documentation on how to use can be found here.

(Jeremy Howard) #20

You probably need to remove your tmp folder.

(Jeremy Howard) #21

To use it in jupyter notebook, you’ll need this info too: https://davidhamann.de/2017/04/22/debugging-jupyter-notebooks/