THREAD: How does machine learning 🤖 differ from regular programming? 🧑‍💻

In both, we tell the computer 𝗲𝘅𝗮𝗰𝘁𝗹𝘆 what to do.

But there is one important difference...
2/ In regular programming, we describe each step the computer will take.

In machine learning, we write a program where the computer can alter some parameters based on the training examples.

How does this work?
3/ Our model has a lot of tiny knobs, known as weights or parameters, that control the functioning of the program.

We show the computer a lot of examples with correct labels.

Here is how this can play out...
4/ "Computer, this here is a dog".

The program looks at its outputs - "oh, to me this looks only slightly like a dog, but let me tweak my parameters to improve my performance next time".

This process is called training. Many parameters get updated many, many times very quickly.
5/ Once the training is done, we get a computer program! One that has many parameters, performs many simple operations.

A program that we can save, move around and run on new data.

This is what I meant in this tweet 👇
6/ If you find this as fascinating as I do, do check out this @fastdotai lecture where @jeremyphoward covers all of the above, and more, in greater detail!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Radek Osmulski

Radek Osmulski Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @radekosmulski

12 Feb
THREAD: Sometimes code can seem impenetrable. But there are various ways we can make our life easier.

A common pattern is a function or an object accepting a function. Here is an example.

A 𝚜𝚙𝚕𝚒𝚝𝚝𝚎𝚛 can be a thing that can be called.

But what inputs will it receive? Image
2/ This is not a straightforward question to answer.

But we can learn so much more about what is going on right here in our Jupyter notebook!

Enter 𝚜𝚎𝚝_𝚝𝚛𝚊𝚌𝚎.

We can manufacture an anonymous function and have 𝚜𝚎𝚝_𝚝𝚛𝚊𝚌𝚎 called from inside the 𝙳𝚊𝚝𝚊𝙱𝚕𝚘𝚌𝚔! Image
3/ We can now query the actors.

𝚂𝚘𝚖𝚎𝚝𝚑𝚒𝚗𝚐 turns out to be an 𝙻 (a 𝚕𝚒𝚜𝚝 with superpowers).

It also seems to consist of 𝙿𝚘𝚜𝚒𝚡𝙿𝚊𝚝𝚑𝚜.

So we now know what whatever is passed as 𝚜𝚙𝚕𝚒𝚝𝚝𝚎𝚛 should take.

But we can do better. Image
Read 5 tweets
11 Feb
THREAD: Can you start learning cutting-edge deep learning without specialized hardware? 🤖

In this thread, we will train an advanced Computer Vision model on a challenging dataset. 🐕🐈 Training completes in 25 minutes on my 3yrs old Ryzen 5 CPU.

Let me show you how...
2/ We will train on the challenging Oxford-IIIT Pet Dataset.

It consists of 37 classes, with very few examples (around 200) per class. These breeds are hard to tell apart for machines and humans alike!

Such problems are called fine-grained image classification tasks.
3/ These are all the lines of code that we will need!

Our model trains to a very good accuracy of 92%! This is across 37 classes!

How many people do you know who would be as good at telling dog and cat breeds apart?

Let's reconstruct how we did it...
Read 17 tweets
5 Feb
THREAD: Can you go from being a treasurer to doing cutting edge DL research through the power of the community? ✨

Sarada Lee (@moodymwlee) is the founder of the Perth ML Group and a Scholar @DataInstituteSF and @Uni_Newcastle.

Her amazing journey began with a selfless act...
2/ In 2016 Sarada founded the Perth ML Group to help others learn.

How can the community support you? 🤗

It can...

✅ help you set up your environments 🧑‍💻
✅ provide technically-sound answers to challenging questions 💡
✅ make learning more fun! 🥳
3/ What are some tips for community participation?

✅ explaining things to others will help you learn 🦉
✅ it's okay to be anxious about sharing your answers publicly - DMs are always an option 📨
✅ experiment with various approaches and learn in a way that suits you best 💡
Read 4 tweets
21 Dec 18
This is how little code it takes to implement a siamese net using @fastdotai and @pytorch.

I share this because I continue to be amazed.
Here is a refactored version that will be easier to change
The models above were my naive adaptations of the simple siamese network concept from cs.utoronto.ca/~gkoch/files/m… (screenshot on the left below) to a CNN setting.

On the right is the network from the Learning Deep Convolutional Feature Hierarchies section but using pretrained models
Read 4 tweets
8 Dec 18
Now that the Quickdraw! competition is over, I added my solution to the repository github.com/radekosmulski/…. It is a model consisting of outputs of res50, incv4 and an rnn along with country code embeddings fed to an fc classifier. The most interesting aspect of the architecture
is how little code wiring everything together required thx to the @fastdotai lib. I replaced the classifier during training (while retaining the other weights) which the @fastdotai / @pytorch combo made very easy to accomplish.

In some sense there is nothing particularly
interesting about my solution above and beyond the basic motions of building a model. For various reasons I didn't get to the point of applying competition specific insights. The model is also partially trained

The winning solution was a CNN ensemble done using LightGBM. It also
Read 8 tweets
26 Dec 17
Favorite recent jupyter notebook discovery - the %debug magic:

1. Get an exception.
2. Insert a new cell, type %debug and run it.

An interactive debugger will open bringing you to where the exception occurred and allowing you to look around!
Type `help` for a listing of available dev superpowers. `up` takes you one level up in the stack.
You can also set a breakpoint and open the interactive debugger at an arbitrary point via doing the following.
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!