Santiago Profile picture
29 Mar, 10 tweets, 2 min read
I've talked about Transfer Learning before.

In summary: you can reuse the knowledge from a different model to kick-start your new model.

Practically, this is how I make transfer learning happen: 🧵👇
First, I pick the model architecture I'll be transferring from.

There are hundreds of pre-trained models for TensorFlow (Check TensorFlow Hub.)

I spend most of my time working with images, and my go-to is usually ResNet with ImageNet weights.

↓ 2/10
I instantiate the model without its top layer and load the pre-trained weights into it.

To make sure I don't destroy those weights during training, I freeze those weights. Frozen weights won't change.

↓ 3/10
Freezing the imported weights is important.

If you don't do this, the weights will just serve as a sensible initialization, but the training process will destroy them.

↓ 4/10
You can also freeze part of the base model but leave a few layers open, so the training process readjusts the weights.

You'll need to explore whether this is best for your problem.

↓ 5/10
I then connect a few layers to the base model. These are the layers that will learn the specifics of my problem.

These layers won't be frozen.

↓ 6/10
At this point, I'm ready to train the model.

I usually go with a good, mid-of-the-road learning rate. My goal here is to get the open layers to learn their stuff.

↓ 7/10
Once the model is trained, and I'm happy with it, I try to fine-tune it to get as much juice from the orange.

To fine-tune the model:

▫️ Grab all the data
▫️ Unfreeze the base model layers
▫️ Set the learning rate to a very low value
▫️ Retrain the model

↓ 8/10
Here is more information about Transfer Learning, in case you are curious:



↓ 9/10
If you want to support my effort to put as much machine learning content out there as possible, please give me a follow and like and retweet this thread.

Your support is the fuel that keeps me going!

10/10

• • •

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

Keep Current with Santiago

Santiago 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 @svpino

30 Mar
We always focus on Python 🐍, math, and machine learning theory when starting out, but that's not all of it.

Fundamentals of Computer Science help tremendously.

Here are 6 topics that will benefit you as a machine learning practitioner: 🧵👇
1. Algorithm analysis

You should be able to compare the efficiency of different algorithms without having to implement them.

2/8
2. Basic data structures

Understanding the different tradeoffs and performance implications of basic data structures is fundamental.

3/8
Read 8 tweets
27 Mar
$5 for the next 2 hours. Back to $15 after that.
$0 if you don't like it.

If you don't want it but still want to support my work, like/retweet this message. Thanks!

gumroad.com/l/kBjbC/rfgnxf4
Thanks for the support, everyone!

This worked.

1 more hour to go.
10 more copies and price goes back.
Read 8 tweets
27 Mar
The perfect way to get into machine learning is to find an algorithm that improves your work right away without much drama.

For software developers, KNN (K-Nearest Neighbors) is a perfect introduction:

▫️ Surprisingly familiar
▫️ Powerful enough

🧵👇
I also like Decision Trees for software developers, but if you did that already, look into KNN.

Here is the summary you need to know: KNN is like a fancy search algorithm that will help you do cool things.

2/6
Here are some of the things that you could solve using KNN:

1. If you have a dataset with missing values, you can use KNN to find a good value for them.

2. You can build a simple recommendation system to promote related products in your store using KNN.

3/6
Read 7 tweets
27 Mar
Why should you consider machine learning?

▫️ Better career opportunities
▫️ Pays really well
▫️ Rapid growth
▫️ It's shaping the future
▫️ Creativity over repetition

Most importantly, it gives us access to solve problems that we wouldn't be able to crack without.
You might not have focused on it yet, but it's not as far from you as you may think.

Here is my recommendation: start reading about it a little bit. You don't have to make any world-rocking changes, just inform yourself better and see what happens.

This depends on your country and the opportunities that exist around you. That being said, conventional development jobs will continue to be more popular.

But every day, there will be more machine learning jobs. The demand will continue increasing.

Read 5 tweets
26 Mar
I've been talking about machine learning for a while now.

It has taken me some time to understand who is my audience, and—more importantly—, who do I want to speak to.

1/5
I want my content to be driven by what excites me. That's the only way I can ensure I'll stay engaged and the content will have a high quality.

I listen to what people want to shape my ideas but always prioritize what I want to say.

2/5
Here is the persona that I want to talk to:

"You are a software developer interested in incorporating machine learning into your tool set. You might be starting from scratch or be on your way, but you aren't an expert yet ... →

3/5
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!