Wiki: Lesson 1


Did you set up fastai on collab correctly? And did you create a data folder for keeping images?
And do share your code, will you?


Were you able to get past this? I’m stuck with the same error.

(Pooja) #230
link to my colab notebook lesson 2 image_model. its not complete as I got some error in between the code.

Its a bit unorganised though.

(Aditya) #231

You are passing in suffix parameter or your image folder has something which it shouldn’t have or its not a image
In my case, it was that there were some other folders like MacOSX
Let me now if you query is resolved,
If it isn’t then this has been discussed before by me, just give a quick search on the forum


Ok so mate, I was taking a look and saw your path pointing to PATH = 'data/planet/'. Are you sure that you have a data folder? Coz I couldn’t find the command mkdir data anywhere.

(Karansingh Purohit) #233

I am using google colab. Why I am getting this error: No such file or directory: ‘data/dogscats/train’
can anyone help? I have downloaded the dataset and unzipped it as shown in the lesson.

(Bryan Daniels) #234

Two suggestions:

  1. When you look at data/dogscats/ make sure you see sub-directories: train/ and valid/

  2. Is your PATH variable set correctly? Within Jupyter, executing ‘!ls $PATH’ should return the contents of data/dogscats/, including train/ and /valid.

(Holly Johnsen) #235

EDIT: I restarted the notebook and now it works. I realized something was up when I tried to go back and rerun with cats/dogs and it was no longer working. I’ll leave this post up instead of deleting it in case someone else gets this error and searches for it, though.

Is training the model on your own data supposed to be as simple as making a new set of folders that contain images corresponding to two new things and then changing the PATH variable? Or are there other parts you need to change too? I did those steps, but I am getting an error (RuntimeError: cuda runtime error (4) : unspecified launch failure).
I’m wondering if there is something wrong with my data that could be causing things to fail or if I am missing some other steps in adapting the code to work for new data. I did make a sample folder with just a few files that are all actual images though, and I still get the same error, so I think it’s something more than just having corrupted files or something.

(Susant Bisoi) #236

Data folder is not there and u have to use the command to pull the data like below

(Susant Bisoi) #237

I followed this command to clone or copy the folder to my Azure DL vm (ubuntu vm)
"git clone but after that i notices it contains old file but whatever u have shared contains correct file(the

Old path is mentioned in the wiki page.

Which one is correct?

(Xu Fei) #238 is the right one

(gram) #239

Now that I’ve used the lesson 1 notebook on my own images, how would I use the model to sort images?


Y. I’m new to the course, and just ran into this obstacle. Similar to Nyx and Paul, I’ve waited for 2 days to receive a response back - to no avail. So, like Paul, I’ve just submitted a HelpDesk ticket. Hopefully that’ll do the trick … I’ll let you know!

(Morgan Weiss) #241

How did you out your data in to run the test? I cannot figure it out.

(Pierre Guillou) #242

About getting automatically the value of the best learning rate

The learn.lr_find () function is great but looking visually for the best value of the learning rate on the graph seems to be a bit of an old-fashioned technique, no ? :slight_smile:

Has anyone created a script that automatically gives this best value after using learn.lr_find () ?

(Morgan Weiss) #243

I am stuck exactly where Luke is, can anyone help me out?


Hi all,

I tried search the forum and this thread for an answer, but it seems to be very few things associated, at least as I could find.

I am currently a complete beginner when it comes to Deep Learning, however I have a solid background of programming. I would like to ask for a piece of advice here. I started looking at the first lecture, and after googling about at the costs of AWS (e.g. paperspace) I came to realise that it is not very cheap in the end anyway, especially with cost increasing proportional to use.

I have a freshly built (watercooled) rig, that I would then like to run my Deep Learning server (DLS) on. I run W10, with:
Asus Maximus IX Hero mobo
Intel i7 7700K
GTX 1070
16GB ram
2 SSDs + 1 HDD
Corsair AX 860W PSU

I honnestly feel like it would be a pity for me to use anything else than this. I could upgrade RAM and run SLI if needed. So now to my questions:

  • Since I am primarily a Windows user, I would like to run a virtual box (VB, or something similar, better if existing?) for my DLS. Are there any downsides, primarily in terms of speed, to running it through VB or will it work just as the AWS?
  • Should I consider upgrading the PC? RAM is of course easy, but for SLI I would have to drain the system and remake some of the water pipes.

If anyone has some good insight and/or links on the matter of setting up a DLS using a VB I would be very grateful!


(Subash Gandyer) #245

Hi Hwang,
Same problem here with Paperspace cloud P5000 instance. Kernel is dying after i run the method after 30 seconds. Did you come around with a sloution? Help me with this.


(VincentM) #246

Hi Class!

I’m trying to submit an attempt for the dogs/cats redux. Problem is, my prediction only has 8,819 rows :confused:. I’m pretty sure I’ve parsed the data correctly. My redux data directory contains the three sub-folders I created (train,test, and valid) plus the two that were created when I trained my model (models and tmp). Train and valid each have two sub-folders (cats and dogs). The path variable has been set to the following:

PATH = "data/newdogscats/"

The output of os.listdir(PATH) is as follows:

['.ipynb_checkpoints', 'test', 'valid', 'models', 'train', 'tmp']

The image splits (number of image files) for three sub-folders are as follows:

Train: 8,090 (per class)
Valid: 4,410 (per class)
Test: 12,500

I’ve verified each of these by passing the os.listdir() output to the len() function. Below are the commands I am using to train my model:

data = ImageClassifierData.from_paths(PATH, test_name='test', tfms=tfms_from_model(arch, sz))
learn = ConvLearner.pretrained(arch, data, precompute=True), 2)

and yet my learn.predict() method is only creating 8,819 predictions!? Does this have something to do with the discrepancy between the size of the test and train folders, or is there something else I might want to verify? Thanks in advance for your input.

Update: len(data.val_y) only output 8,819. So, I’m thinking it might an issue reading files from the test folder.

Second Update: Solved my own problem :+1: It had nothing to do with the commands I pasted. When using learn.predict() you need the is_test = True argument.

(Arun Vellat Sadashivan) #247

Hi Reshama,

I am currently trying to configure AWS to start working on this course. I’m following the link of yours. I tried logging in with
ssh -i aws_fastai_gpu.pem ubuntu@ -L8888:localhost:8888 .

However, the output I got was:
Warning: Identity file aws_fastai_gpu.pem not accessible: No such file or directory.
ssh: connect to host port 22: Operation timed out

It turns out that there is no file called aws_fastai_gpu.pem in the .ssh directory.I am on Mac - I had to a create a .ssh folder within /Users/arunvs/ and the only contents of the directory after running sshgen are id_rsa, and known_hosts.

I am not sure how to resolve this issue about logging in. I am new to both AWS and Mac. Your help will be much appreciated.