299€ or 2 x 149.00€

MASTER NEURAL OPTIMIZATION: Elite Tactics to Build Production-Ready Algorithms with PyTorch

For aspiring Deep Learning Professionals looking to build ready-to-deploy models and make a bigger impact

You Might Not Like What's In That Page, You Might Even HATE It, But Someone Had To Say It...

In this page, you're going to learn about my course on Model Optimization and Deployment.  

Before you do, realize the following:
  • This is a topic that most people will consider utterly boring — and you probably won't get a date showing what you'll learn in this course (but you might get an interview).

  • This course is super important for aspiring Deep Learning Professionals, but is completely skippable if you don't aspire to work in the field and are just playing.

So if at any point you need to wonder if you're serious enough to join this course, you probably aren't. This is a course for aspiring Professionals only, and therefore not everybody should join.

👉🏼 That said, I believe that every Edgeneer should learn how to optimize and deploy models, and stop being in "Play Mode", where all you do is prototyping models that will never be used by anyone.
If you have already trained Deep Learning models, and been to Deep Learning interviews, you probably noticed how real companies are looking for a cycle that is closer to this:

Indeed, companies need optimized (light, fast, compact) models that have been made "production-ready" through the Deployment step.

Although these can feel much more boring than learning about 3D Deep Learning or HydraNets, and although this is extra-work that might not change a thing to your output portfolio video, learning these 2 extra-steps can help your models being 10 times faster, optimized for multiple devices running different languages, and ready for the real world.

For you as an engineer, it means being preferred in the hiring process, being seen as a more professional person by your managers and colleagues, and most of all, having your code downloaded and run by real self-driving cars, and thus impacting the world with your contribution.

So far, you've been in Play Mode, and although this is a fantastic place to be in, it has some flaws:

🧐 Your models work, but even you wouldn't trust them to work inside a real self-driving car.

🐌 Your projects are advanced, but aren’t fast enough to be used by the field.

😶 Your learning path is full of fun, but you’re wondering if all of that will ever get more serious.

At the opposite of you, there is the very unattractive Pro Mode.

The Pro Mode is some weird place where engineers end up deploying rule-based systems all day and call it "Artificial Intelligence".

It’s a place where passion died and got replaced by suit and ties. It’s a place where advanced is replace with “sure”. Where stochastic is replaced with deterministic. It’s a place where engineers lose their advanced skills, to replace them with “platform skills”.

👉🏼 The last thing you want is to realize you’ve been this far only to end up in a job that feels like any other job.

My alternative? The Pro Player Mode -—stealing the best attributes from both.

✅ You don’t need to learn how to use Intel and IBM’s platforms (nor want to), but you do need to know how to “pump those rookie numbers up”.

✅ You don’t need to wear a tie, but you do need to know how to make a model exportable to any device running in any language.

✅ You don’t need to lose your passion, but you do need to have your work being used. Otherwise, what's the point?

👉🏼 Being a Pro Player combines the best of the two worlds, it means learning how to optimize and deploy cutting-edge models.

Introducing... MASTER NEURAL OPTIMIZATION: Elite Deep Learning Tactics to Build Production-Ready Models

In this course, we'll focus on adopting these tactics to make your cutting-edge models up to 1200% faster, optimized, and ready for production.
Here is a look at the Program:

Part 1 — Model Metrics, Pruning, and Edge Deployment

In the first module, you'll learn the full cycle of a model: from training it, to optimizing it, to deploying it on a hardware.

What's inside:

  • 4 KPI METRICS you need to monitor in a Deep Learning model and how to calculate them with PyTorch (based on the old saying "you can't improve what you can't measure", we will develop a system you can use to measure every network you develop from now on)

  • The Researchers Formulas to PREDICT THE INFERENCE TIME of a Model before it's even coded!

  • 11 Optimization Techniques You Can Use to 2x, 3x, or even 10x the FPS of your models (warning: some of these techniques require just a few minutes, while others will be long to implement but highly efficient — 2 of these techniques are unofficial "backdoor" techniques)

  • A simple CONVOLUTION TWEAK that will can make your network up to 96% FASTER with minimal accuracy drop. (hint: The reason MobileNets are so fast is behind this tweak)

  • A short but concise introduction to HydraNets and Multi-Task Learning (even though they require you to change your model, this is a fantastic technique to make your projects faster)

  • The "Loki" technique to make your models incredibly lighter without reducing a drop of accuracy (this technique even contains "Variants" as explained in the course)

  • MODEL PRUNING: A Deep Dive into 6 Different Pruning Algorithms and how they work.

If we pause here for a second, Model Pruning is the idea of removing some weights of your network:

This is going to be our first optimization technique. It can be done in several ways, and we'll code at least 3 of them in a mini-workshop. At the end of this Pruning Section, you'll have a solid optimization technique to use every day at work.

  • The exact setup you need to have pruning working for your model (it won't work anywhere, and without this setup, it just won't work)

    ✅ MODEL PRUNING PROJECT: Learn to Pick a Dataset, Train a Model, and Optimize it using 3 different Model Pruning techniques.
As soon as we know one technique to optimize a model, we'll dive into model deployment:

  • 4 DEPLOYMENT ENVIRONMENTS companies use, and what to do if you don't have access to a GPU (not everything is deployed on GPU, most algorithms are actually deployed on CPU, VPU, and FPGA)

  • The TESLA Development Cycle introduced by Andrej Karpathy to run HydraNets in a fleet of 200k+ cars on Autopilot.

  • How to make Your Models Production-Ready and Exportable to C++, Swift, or any other language with PyTorch (if you're a Python Engineer who hates C++, this could mean working in C++ companies without being a bully)

  • (Bonus) 3 of my best Daily Emails & Articles on Model Deployment & Optimization

2 — Advanced Optimization Techniques with PyTorch

Once we know how to apply "Model Pruning" to our network, and once we have used it in a project; we are going to take things more advanced.

Weight Quantization: Double Your FPS

We'll begin by learning about a technique called Weight Quantization, used to convert FLOATs to INTs. Operations in FLOAT take about 10x longer than INT operations. Imagine what we could do when applying these to MILLIONS of matrix multiplications?

Here are some results obtained by quantization (and shared publicly):
  • Inference Time is 2-4x faster
  • Model Size if 2x Smaller
  • Memory Bandwidth is 2-4x smaller

Here's the program to learn this:
  • THE 6-STEP FORMULA to Quantize Neural Networks with PyTorch (some of these steps will highly depend on your deployment environment)

  • The MATHS behind Quantization (and Dequantization) along with a step-by-step example.

  • How to know if your network can be quantized (some models are forbidden from quantization)

  • 5 Warnings about Quantization that could make this technique impossible to use (disregard at your own perils, but there are important obstacles you need to overcome)

  • 3 ADVANCED QUANTIZATION ARCHITECTURES and when to use them.

    WEIGHT QUANTIZATION PROJECT — Turn a slow Semantic Segmentation Model into a World-Class Star Algorithm.

Knowledge Distillation: Advanced 10x Architectures

Finally, we'll use the most powerful tactic of them all called Knowledge Distillation.

In this technique, the Teacher Network is heavy, and perfect for training. On the other hand, we have a Student Network that is lighter, smaller, and perfect for inference. Our Teacher Network is accurate, but our Student is fast. Knowledge Distillation is about having the teacher teaching the student how to be as accurate while staying light and fast

You'll learn:
  • The Difference between Knowledge Distillation and Transfer Learning (and how to combine both for better results) 

  • The DARK KNOWLEDGE secret to distill knowledge from one network to another (warning: dark knowledge is almost a mystic art, only the experimented engineers should dare to go there)

  • 16 Knowledge Distillation Approaches (and where to learn about them)

  • The DISTILLATION LOSS Function Explained, Component-by-Component (this is another variant loss function, we'll go over the most popular one to build foundations)

  • A Look At the Kullback-Leibler Divergence (these are some hardcore stats used in many cases, we'll go over what it means in our case)
     
  • How to TRAIN a Knowledge Distillation Architecture End-To-End (as we won't be in Pro Mode, we will actually train the model, design the loss functions, and do everything ourselves)

  • The 3 FAMILIES of Knowledge Distillation Algorithms you need to know (there are more, but these 3 are enough to be considered knowledgeable)

    ✅ KNOWLEDGE DISTILLATION PROJECT:
    You will train a Teacher Architecture to Distill its Knowledge to a Student Architecture and teach it semantic segmentation.

Let's look at the project: We are going to use two models:
  • A Heavy Teacher Model, already optimized with excellent results
  • A Light Student Model, unoptimized with bad performance.
Here are the results after the distillation process:

Notice how we were able to 10x our speed without a huge drop in performance.

  • HYDRA-DISTILLATION: How to  use Knowledge Distillation with HydraNets (warning: this is an advanced technique only those enrolled in my HydraNet course will understand) 

  • An advanced Solution using Hydra-Distillation to LABEL A DATASET that contains no label (this is an advanced technique, but as for everything that involves HydraNets, this could be a go-to in the industry a few years from now)

  • and many more....

Is this course for you?

"If you have to ask, you’ll never know. If you know, you need only ask.” Helena Ravenclaw to Harry Potter.

Although lots of engineers are today familiar with Deep Learning, not so many have the required skills to get their dream job.

Only you shall decide if you should join a course on Optimization and Deployment, but to help you, here are a few reasons NOT to join:
❌ You have no idea what Deep Learning is, and have never faced issues with FPS, or model performance
❌ You don't have basic Deep Learning skills, and have never worked with Convolutional Neural Networks before
❌ You can't code in Python
❌ You just want to watch videos and don't feel ready to code

❌ You're looking for skills about 3D, 4D, or other "cutting-edge" approaches (I have plenty of courses for this, but not this one)
❌ You already know how to apply the 3 Main techniques I listed above
❌ You're looking for evergreen tactics that will work forever on any model (this is an emerging field, full of uncertainties and constantly being renewed).
❌ You don't want to learn about optimization, and are okay with never going professional.

However, if:
✅ You are ready to include some "Pro" features to your projects and make them super-performant.
✅ You know how to code in Python, but you don't know how to Pythonize your code
✅ You have already built CNNs and trained them, but struggled with FPS
✅ You want to learn everything I mentioned before, and feel ready to explore.
✅ You're looking for a professional career that involves Deep Learning, and not just prototyping.

Then, you should probably join!

Below are frequently asked questions:

What are the prerequisites to follow the course?

Since this is an intermediate level course, there are a few prerequisites, such as:
  • Coding in Python
  • Understanding Deep Learning and having experience with it
  • Being Okay with PyTorch
  • Having already trained a CNN for Image Segmentation (this isn't "mandatory" but image segmentation will be used in the course and it's better to know what it means)

How long is the course? What is the format?

Depending on your level, it can take you between 4 and 7 hours to complete the course.
The goal of the course is to help you learn model optimization by building 3 different projects. Depending on how far you want to take these projects, you can spend more time.

The course will be a hybrid of videos and text. You won't need any GPU, everything will be done on Colab.

How does this help me as a Deep Learning or Computer Vision Engineer?

A couple of years ago, as an Autonomous Shuttle Engineer, one of my missions was to develop a lane line detection algorithm.

In a shuttle or an ADAS system, lane line detection is probably the single most important feature.

My system was "working", but it only had 5 FPS.
I had 3 ways of doing it:
  • Use a segmentation algorithm to draw the lane lines
  • Use a segmentation algorithm to draw the freespace and the lane lines
  • Use an algorithm to regress the lane line equations directly
I picked option 2, and it looked like this:

Although it was stuck at 5 FPS, notice how the algorithm was quite advanced and fun to develop, and although the lane lines were perfectly extracted (Frame Per Second).
This could have been a small concern, but it just wasn't.

My boss asked me to "pump those rookie numbers up", and prepare it to work on the shuttle...

So, what would YOU do to tweak the FPS up? My ideas at the time were:
  • Reduce the input image size (but affect the results)
  • Find another model that was faster
I was out of options. Reducing the image size wasn't working that well, and I had no clue what other model to use.

With that, I was asked to make my model "portable" so it could be used by C++  algorithms.

A disaster.

I looked highly unprofessional, like a kid who found a tutorial somewhere and played with it, but who couldn't step up to the industry level.

This is due to being in the "Play Mode" for too long. And it damaged the beginning of my career in self-driving cars.

If you are serious about Deep Learning and Self-Driving Cars, the question, you should already have realized that building models that nobody will use is going to become a dead weight. Learning how to optimize and deploy models should be a no-brainer.

Brandon Elford, AI Developer — Potential Motors

The third course I have taken with Think Autonomous, won't be my last!

This course demystified popular techniques for optimizing models for deployment, and made them more approachable. 

Great course!

Arief Ramadhan, Senior Data Scientist at Blibli

A great course with thorough and clear explanation! Highly recommended!

Abkul Orto (about Neural Optimization Codex)

Thanks for sharing the content. Am reading again and again.its the most distilled, crystal clear, laser sharp explanation of the topic.

Am still distilling the content word by word. Will go through both courses again (HydraNet and Neural optimization) to beef up my understanding having rearmed.

The inclusion of  appendix was excellent move. Such addendum are great companion.keep doing for other courses.

299€ or 2 x 149.00€

MASTER NEURAL OPTIMIZATION: Elite Tactics to Build Production-Ready Algorithms with PyTorch

For aspiring Deep Learning Professionals looking to build ready-to-deploy models and make a bigger impact.

Lifetime Access to:

  • The Pro Player Tactics to Optimize Models

  • The Model Deployment Guide

  • An In-Depth Look at Model Pruning, Knowledge Distillation, and Quantization