Lesson 3 - Official Topic

If the number of cases are doubling every three days (for a few weeks) that seems like an exponential function. That is simply the result of the infection rate > 1 (every infected person infects more than one other person). Of course, there is only a finite pool of people so there is not much more to infect after a while. And, yes, for very negative x, exp(x) / ( exp(x) + 1 ) approximates exp(x). Not sure what x would be in this case, maybe the time (negative) between the first person infected and the time (zero) when the number of new cases start the level off.

Jeremy’s function can represent any second degree polynomial. After removing noise, speed is a second degree polynomial. You can see it if you expand the square.

Has anyone tried to use the fastpages template to generate a blog? I tried a couple of times without success. I originally had created one using the fast_template which worked, but then I deleted the repository because I thought that’s what this error message was complaining about.

The page build completed successfully, but returned the following warning for the gh-pages branch:

The CNAME [fastpages.fast.ai](http://fastpages.fast.ai/) is already taken. Check out https://help.github.com/articles/troubleshooting-custom-domains/#cname-already-taken for more information.

For information on troubleshooting Jekyll see:

https://help.github.com/articles/troubleshooting-jekyll-builds

If you have any questions you can submit a request on the Contact GitHub page at https://support.github.com/contact/pages?repo_id=253366424&page_build_id=172698127

1 Like

Hi all,

I finished the classification and all is good on Google Colab, I tried to upload a photo from my desktop to the app and I got this error:
TraitError: Element of the ‘data’ trait of a FileUpload instance must be a bytes object, but a value of None <class ‘NoneType’> was specified.

Can anyone explain what does error mean?

Thanks so much! did Voila worked with Google Colab??

I has same ‘bug’, you can ‘stretch’ navigation menu by mouse - take grey triangle (it under widgets on you screenshot) and stretch it!

Maybe check your config.yml file to see if you still have fastpages.fast.ai somewhere? And this bit from the documentation might help too.

By the way, how did you create your fastpages site? Did you start from scratch following the setup instructions? (this tutorial video shows the process) Or did you do things “by hand”, starting from your old fast_template repo?

oh, haha, ok. Thanks.

Just to add to the others’ replies.

Path is a class from the pathlib library. One solution could be

from pathlib import Path

(essentially @mrfabulous1’s ).

However, fastai2 (and in fact fastai as well), adds methods to this class, e.g.

path.ls()

which you can only be sure to load if you use

from fastai2.vision.all import *

as recommended by pierreg.

1 Like

Thanks so much, it worked with me when I used ```
from fastai2.vision.all import *

but I didn't know I can import it as well by 
from pathlib import Path

Side remark: the format of your text is a bit off. The triple backpacks ``` at the end of your first sentence should be at the beginning of the next line.

I have just noticed that now, I didn’t write it, it might be added becasue I copied your line. Sorry for the confusion,
cheers!

No worries!

Note that you can edit your post: click on the edit icon (a pencil, a little to the left of “Reply”, next to the three dots).

1 Like

I posted my notes on chapter 3 from the book here: https://raw.githubusercontent.com/kldarek/fastbook-notes/master/chapter%203.JPG
Not sure if anyone other than me can read it, but I am trying to maintain a weekly drumbeat and posting these on the forum is a good motivation :slight_smile: Enjoy!

3 Likes

Hi, yes, I started from scratch following the setup instructions. But I had already created the fast_template so I thought that may have caused an issue. Thanks for the links – I will take a look at them.

In chapter 2 of fastbook,

We often talk to people who overestimate both the constraints, and the capabilities of deep learning. Both of these can be problems: underestimating the capabilities means that you might not even try things which could be very beneficial; underestimating the constraints might mean that you fail to consider and react to important issues.

In a very humble tone, looking at the continuity of text - should the opening line be We often talk to people who underestimate both the constraints instead of We often talk to people who overestimate both the constraints

Thank you @Salazar! Spent too much time before seeing your reply!

1 Like

There is no difference between a*(t**2) + b*t + c and a*(t-b)**2 + c.

a*(t-b)^2 +c
= a*(t^2 -2*t*b + b^2 + c
= a*t^2 -2*a*b*t + a*b^2 + c

This expression is equivalent to A*t^2 + B*t +C. Where
A = a
B = -2*a*b
C = a*b^2 + c

Gradient Descent, find the correct value in both cases. :slightly_smiling_face:

I really like your COVID plots within the app!

Since I didn’t have a shoe image at hand, I just fed the model my own profile picture. Predicted brand: nike, with probability: 0.9657 :wink:

1 Like

You can look at the requirements.txt I used to deploy fastai2 model to Azure Functions (which is like Lambda). You can remove one of the package specific to Azure when you deploy to Heroku. I do use the CPU version of Pytorch and Torchvision. But somehow due to some reason I needed ipykernel also. Not sure if I need to narrow my imports (Currently I am doing a “from fastai2.vision.all import *” in the deployed model service. I was not sure the minimal set of imports). Anyway my zipped package came to about (300 odd MB) even with ipykernel and a host of dependencies it pulled in. It surely would be good to decouple Jupyter related dependencies in the fastai2 while deploying. Also you can do a --no-cache-dir option when pip install to reduce the size as you may be having some pip caches.