Lesson 1 discussion - beginner

Use this thread to discuss topics related to lesson 1.

Hi,

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

I am in:

‘/home/nbuser/courses/fastai2/courses/dl1’

How do I fix this issue please?

Thanks,

Faris

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

Thanks Jeremy. Sorry, I forgot about that.

@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):

sleep(2)
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!

Hi,

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

Thanks,
Faris

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

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?

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 ?

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

try this to add the fastai folder to your python path

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

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.

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.

1 Like

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

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.

You probably need to remove your tmp folder.

1 Like

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