General course chat

@Brainkite… many thanks

Hi bguan hope you are having a wonderful day.
I would suggest you go as quickly as you can doing part 1 v3, doing all the things Jeremy says to do. e.g. build an app, do the exercises.
This will help cement your previous knowledge and confirm how much you have learned and retained from your previous courses.
It will also mean you will be able to go through part 2 quicker.

In my experience it is far easier to do a course than build an end to end app for a client or friend that works on the internet. Also part 2 builds on the work done in part 1.

With your previous course knowledge it should be a breeze. :wink:

Hope this helps.

mrfabulous1 :smiley::smiley:

2 Likes

Hi there,

First of all, I’d like to thank you guys for sharing the videos and all the course content online! I work in a Health Tech start-up called eDoc and I watched all the course intending to use some sort of machine learning algorithm to use on the Electronic Health Record (EHR) data in my database to extract information like: patients weight, height, if is a smoker, if is a alcoholist and if they have some other comorbidity. I have access to 1 million health records for 100k patients, and all their insurance expenses.

My first attempt was to use Transfer Learning to classify patients with labels like “ex-smoker”, “currently smoking”, “denies smoking” for smoking habits; “ex-alcoholist”, “alcoholist”, “never was alcoholist” for alcohol consumption habits and so forth.

Currently, my data is something like the following:

Patient | EHR
1 | “Woman, 42 yo, denies smoking, consumes alcohol 3x per week, weight 88kg, height 1,70…”
2 | “Man, 66yo, smokes 20cig/day, complaining about chest pain…”

And I’d like to apply some labels like:

Patient | smoking habits | alcohol habits | weight | height | cig qtt
1 | “denies” | “alcoholist” | 88 | 1,70 | n/a
2 | “smoker” | n/a | n/a | n/a | 20

But, when I have a smoker patient, usually the doctor inputs some metric like “weight: 70,2kg, height 1,81m. Have been smoking for 15 years, 10 cig/day”. If I understood the approach taught in the lesson 4 correctly, it’ll fail to extract metrics like Float Numbers, right?

Do you have any suggestions?

why my model take 38 mins instead of 2 mins by the way i am using goolge colab with tpu enabled. did i miss any thing

Does anybody know which one we should take as Lr

5e-7

or

7e-4??

have you tried to switch to GPU option? I’ve never done anything with TPU but everything is just fine with its GPU. You may take abit more time compared to Jeremy’s time in the lessons though.

just take Jeremy’s words: experiment everything and see how things go. Usually, LR is not as big as 5e-7, but just give it a try and see :slight_smile:

Hey there,
I am currently playing with this dataset concerning snake-species-classification: https://www.aicrowd.com/challenges/snake-species-identification-challenge

Comparing resnet34/50 and different image sizes. I realized that I forgot to normalize my data bunch, so I thought that should have quite some impact. But when I tried it, the results were pretty much the same.
Are the images normalized by default somewhere or why is that?
Cheers :slight_smile:

Lesson 3/4 - Language Model, Text Classifier and Transfer Learning:

Following the above lessons and @jeremy clear explanation about the benefits of transfer learning, I am trying to perform transfer learning twice (after training the LM). The problem is that my first classifier has 3 output classes whereas the second classifier has 5 output classes.
I can’t seem to adjust / change the last layer to be of 5 classes.
I saw that in case of image and CNN, ppl suggested to do something like:
learn.model[-1][-1] = nn.Linear(in_features=150, out_features=5, bias=true).
However when using a Sequential RNN - trying to perform TL with Text - it does not work for this class…
Any help will be appreciated!

A solution that seems to work is:
learn_new.model[0].load_state_dict(learn_interm.model[0].state_dict())
It improved the results, however, I’m not sure if it did copy the weights to all layers.

1 Like

Hi all. I am trying to use fastai for image regression problem. I have realized in creating the data bunch, it can not read and manipulate 3D tiff images. It works properly for 2d, but when it comes to 3d images, it makes an error.
OSError: cannot identify image file

I have realized the fastai.vision image calls PIL.Image, which can not read 3d images (It can accept multi-channel images (RGB) of 2D images, but not a 3D image).

I am trying to convert 3d image to a grey scale, but it gets the third number as the channel, which is not correct and gives me a 2d grey scale output.

I’d appreciate if anyone can help.

Hey, I want to know when applications will be open for Fast.ai Part 1 this year. Thanks

This error may mean that your Kaggle instance doesn’t have access to the outside internet turned on, or is an unverified account. Kaggle requires you to verify your account via sms message if you want your notebook to access the outside internet.

  1. Check your internet settings in the notebook to see if it has access to the internet or if sms verfication is required
  2. Complete verification or turn on internet access for the notebook
  3. Restart the kernel and your session to make sure that the settings have taken effect.

I’m new to fastai and just going thru lesson 1. I recently completed Andrew Ng’s ML and DL courses on Coursera, those courses were based on MatLab and Numpy/Tensorflow respectively. Like many, I found Tensorflow to be very difficult to grasp and debug due to the static nature of the graphs, sessions, etc., so for this reason PyTorch seemed attractive to me as it feels much more like Python. BTW, I come from a hardware background so anything learned is new ground for me.

My understanding (or lack thereof…) of fastai is that it is wrapped around Pytorch and therefore an abstracted framework with respect to Pytorch. My concern is that instead of learning to apply Pytorch I would be learning another framework to further scramble my already overburdened little brain. If anyone can offer their insights, or even better, correct my understanding of fastai, that would be much appreciated.

1 Like

Hi good to know you, Though Tensorflow 2 doesn’t have Session, graph etc. It is now easy to debug. But Yes Pytorch is very flexible to use.

@sgugger

Hi redexces hope all is well!

I originally come from a hardware background also and experienced the same things as you when trying to learn ai. I started with writing my own algorithms in Java (crazy), then switched to sckit-learn then moved to tensorflow then to keras https://keras.io/ all of these didn’t suit me and I found them quite difficult to make anything decent.

Then I was introduced to fast.ai by a friend and its been my best experience so far in AI. Although I am proceeding slowly and am now between lessons 3 and 4 of the http://course.fast.ai/ I have just looked at lesson 8 just to see whats in store.

In lesson 8 Jeremy appears to be giving a tutorial on creating ones own fast.ai library. For my skill level this sounds absolutely crazy but sounds feasible now for me now, as I understand so much more due to the videos, the forum and Jeremy’s philosophy and I love the notebooks.

If you have done Andrew Ng’s ML and DL courses on Coursera then you will find fast.ai a breeze. I Did some parts of Andrew Ng’s course, but have found the fast.ai courses suited my learning style more, as I always like to build, what I learn, it helps my understanding.

Also in part 2 of fast.ai there are lessons on incorporating Tensorflow into fast.ai,
with the previous courses under your belt, you should find it a stroll in the park :wink:

In addition there is a production section, to help you put your trained models on line, for the world :world_map: to see.

Cheers mrfabulous1 :smiley::smiley:

1 Like

Thanks for your reply! You are more ambitious than I am writing your own algos and such. I hope that I can make use of all these courses I’ve taken, there is so much information out there it’s difficult to know what is useful or not.
The motivation behind my question is that I don’t want to move from one framework to another without really knowing any one well. Like you, I did a few bits in scikit-learn thru an introductory ML class, then Numpy, Tensorflow, Keras, and now fastai. It seems like fastai is a framework itself with a good deal of abstraction, therefore you have to know the library well to make use of it. I’m hoping that I can settle on PyTorch since it seems very much like python, unlike Tensorflow (although TF-2 is supposed to be much more pythonic…)

Hey Earthyearth, which lesson you were in and can you post the error message?

I was able to figure it out. Thank you.