Lesson 1 In-Class Discussion ✅

Hello! I set up Salamander and was able to access the notebooks. I had no issues the first few times through, but I randomly started receiving the below error when trying to create a CNN using resnet34. Interestingly enough, I have no issues at all when I use resnet50. I’ve searched everywhere and can’t seem to find what may be causing this or how to fix it, and am a bit of a beginner so debugging the unpickling process is a bit tough at this point. Can anybody point me in the right direction?

Running this:
learn = create_cnn(data, models.resnet34, metrics=error_rate)

Leads to this (let me know if the full output from the debugger would be useful, just didn’t want to clutter the page):

UnpicklingError: unpickling stack underflow

I’m trying to train resnet 50 and when I execute this line of code:
learn = cnn_learner(data, models.resnet50, metrics=error_rate)
I get an error:

URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>

Has anyone run into this problem?

Perhaps helpful:
I’m using Salamander, on Brave browser and Brave is telling me the notebook is not secure…(normal?)

Running into ModuleNotFound error when I try to run the notebook. Would appreciate any help: https://stackoverflow.com/questions/57910449/modulenotfounderror-no-module-named-fastai

My solution:

I could not resolve this issue and when I found that there is no support for salamander I chose to switch to AWS and boom everything works.

However, AWS has a way, way steeper learning curve and it is more expensive.

I would have liked to stay with Salamander but I was eager to get though the exercises and continue learning.

Hello All,
This is my first attempt at any kind of Machine Learning. I wanted to discuss next steps after going through lesson1, apologies if a similar question has been asked before, feel free to point me to the answer if there exits one.

From what I understood the homework/ assignment for the lesson 1 is to try and build a image classification model on your own using your dataset.

Ques 1 : Is the correct ?

If i have a image classification model idea in mind lets say : Classify different modes of transport [bus, train, ship, airplanes] etc, my first step should be to create a dataset using one of the approaches mentioned in an answer(create dataset…). To create this, i should have some samples of each class and place them under train and valid data folders(if using that format). Once this is done, i could train a model and see the results.

Ques 2: Is my understanding correct ?

Thanks
Tarun

I’m just starting out as well, but your understanding matches mine.

2 Likes

Hi.

I’m having a bit of trouble running the notebook. When I try to run

path = untar_data(URLs.PETS); path

I get an error spew in which the fundamental problem seems to be a failure to connect to the URL:
gaierror: [Errno -3] Temporary failure in name resolution

NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ec4ed7cf8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

When I go to the URL
https://s3.amazonaws.com/fast-ai-imageclas/oxford-iiit-pet
in a browser, it gets me

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>oxford-iiit-pet</Key>
<RequestId>3B2B6FB0B0EFD384</RequestId>
<HostId>
J3u/MeV06s1+iHKaU0bShnGufKLnpM3AHIdgtV6dapMMfkNA9GcOxeC4p72dJClRuGPMViiWx7w=
</HostId>
</Error>

Any ideas how to resolve this?

Update: Tried to use the original robots.ox.ac.uk URL and got the same error. Running on Kaggle.

Hey everyone!

I finished Lesson 1 and absolutely loved it.
I wanted to implement these techniques and functions elsewhere, and I tried to apply it to the MNIST Dataset that is available on Kaggle (not the one available in the fast.ai library).

I am stuck on the ImageDataBunch() function, and I am not sure what the “Path” argument should contain. I know how to import data from my system, and convert into a Data Frame or CSV and use the appropriate functions, but I am still not sure what my “Path” argument should contain.

Please help.
Thanks in advance.

disclaimer : i am no expert at this, but which method in the ImageDataBunch is causing the issue ?

This might be a good starting point : https://docs.fast.ai/vision.data.html#ImageDataBunch

Yep, went through the documentation. It seems to work only after all necessary arguments are added, such as valid_pct, for the from_folder type. Thanks for the help!

Hi, I am having trouble getting the google images urls using the javascript

      urls = Array.from(document.querySelectorAll('.rg_di.rg_meta')).map(el=>JSON.parse(el.textContent).ou);   
window.open('data:text/csv;charset=utf-8,' + escape(urls.join('\n')));

Running in the google chrome console I get a .csv file but it is empty (0 bytes). Any ideas what I am doing wrong? I am running Linux Mint.

There is an easier way to download google images using the google-images-download python module in your jupyter notebook.
Here are the steps to download the different bears images

First install the python module
!pip install google_images_download
Then in the subsequent cells, start downloadig the grizzly bears (-k grizzly argument below)
!googleimagesdownload -k grizzly -l 100
A new folder called downloads/grizzly will be created with 100 images in it (that’s the -100 argument n the command above)
Do the same thing for the other categories
!googleimagesdownload -k ‘black bear’ -l 100
!googleimagesdownload -k ‘teddy bear’ -l 100

Run the ls command
!ls downloads/
and you should have the 3 following folders
‘black bear’ grizzly ‘teddy bear’

2 Likes

Hi

I am experimenting with the concepts in lesson-1. However, when working with lr_find(), I see an empty graph on plotting the lr graph.

Kindly, can someone help me understand why the lr_find plot is coming out to be empty.

Thanks
Gopi

This thread might help: Blank lr plot returned

1 Like

Thanks @nbharatula. Going over the discussion now :slight_smile:

What does he mean by ‘model’? Is he going to explain what it is later?

anyone can explain me about backward,i want to write it personally in math

Hi earthyearth hope your are well!
From lesson 1 don’t think I heard a precise definition of a model.
However the post below gives one definition and is an easy read, combine it with lesson 1 info and it should help your understanding.

Cheers mrfabulous1 :smiley::smiley:

2 Likes

Anyone starting the assignment and wanna discuss through it together?

I had the same problem a few moments ago. Are you using lr_find() and the plot command on the same cell? It solved when I put them on different cells.