These TensorFlow updates are huuuuuuuuge! [Google I/O 2021] | Machine Learning Monthly May 2021

Daniel Bourke covers Google I/O 2021's machine learning announcements, including updates to TensorFlow Lite, TensorFlow.js, and new tools like MoveNet for pose detection and Vertex AI. The video reviews TensorFlow Hub, TensorFlow Cloud, and community resources like Papers with Code and Hugging Face.
Chapters
Friends, welcome back. I mean, if you're new here, this is Machine Learning Monthly, the video version of an article I write once a month, which covers the latest and greatest in machine learning, but not always the latest. So if you'd like to check out all the links that I cover in this video, the link to Machine Learning Monthly, the article version, will be below. But there's a lot to cover this episode, so let's just get into it. Let's start with Google's incredible I/O. So Google I/O 2021 just passed, and there was an outstanding number of exciting machine learning and TensorFlow announcements. Of course, there's too many to cover in this video, but I'm going to go through some of my favorites. The first suite of updates comes from TensorFlow Lite, TensorFlow.js, and on-device machine learning. TensorFlow Lite refers to the smaller version of TensorFlow, which enables on-device machine learning. So think running a machine learning model on a mobile phone. Whereas TensorFlow.js is the JavaScript version of TensorFlow, designed for running machine learning models directly in the browser. To help you take advantage of these amazing technologies is Google's new on-device machine learning website. Why on-device machine learning? Well, first of all, it's fast, it keeps data on device, and it works offline. So Google's new on-device machine learning developer page allows you to find an example of how to get your models running on a device by selecting what device type, such as iOS or Android, your problem, such as vision, and use case, for example, image classification. If you're looking to build a machine learning model to run on a small device, like a phone or a microcontroller, check it out. If you found it a little bit confusing before when I said that TensorFlow Lite is for mobile devices, whereas TensorFlow.js is for websites? Well, be confused no more, because TensorFlow Lite models are now compatible with TensorFlow.js. What that means is that if you've trained a TensorFlow Lite model, you can now run it directly in the browser. The benefit of this is allowing a person to try your models right within a web page rather than going through the steps of downloading a full application. It also allows you to to train one model and deploy it to multiple places. For example, train a model, deploy it to a web page and a mobile device. You'll find a bunch of demos and examples in the TensorFlow.js Task API documentation. Speaking of TensorFlow Lite models, there's a new library, TensorFlow Lite Model Maker. This is a library dedicated to helping you build and train TensorFlow Lite models. As mentioned before, TensorFlow Lite models are able to run on device, and now with recent updates, as well as in the browser. All models in the TensorFlow Lite Model Maker library leverage transfer learning— amazing, amazing technique— which means the amount of custom data required for your own problems, as well as the time it takes to train the model, gets dramatically reduced. All righty, let's get into some TensorFlow tooling upgrades, plus a new home for AI on Google Cloud. Up first is a TensorFlow Hub facelift. The home of TensorFlow pre-trained models gets a design update as well as the ability to test drive different models before you use them. So if you're interested in using a pre-trained TensorFlow Hub image classification model, well, how about you see how it goes on an image of your beautiful dog first? And if the outputs aren't so good, well, that just means you might have to fine-tune it on some custom dog images. Just like we do in Dog Vision, which is Milestone Project 3 of the Zero to Mastery Data Science and Machine Learning course. And for many of the newer models in TensorFlow Hub, you also now get links to different resources for training and incorporating them into your own applications, as well as model cards, which you can think of as nutrition labels for machine learning models. Up next, we have TensorFlow Cloud, and I am very excited about this. This allows you to run your local experiments at cloud scale. With only a few lines of code. So you all know experimentation in machine learning is key. You start small and scale up when needed. The TensorFlow Cloud Library helps you do the latter. For example, you might start your experiments in Google Colab running on a single GPU, and once you've got something working, you're like, "Yes, I want to, I want to bring this model to the world." Well, you might need to scale it up first. In that case, you can use TensorFlow Cloud to run that same experiment for a longer time on, say, 8 GPUs instead of just 1 on Google Cloud, all with a couple of lines of code. Google's AI platform, Google's home for AI, previously named, well, it's previously named AI Platform. It's been renamed to Vertex AI. I'm not sure where that comes from, but Vertex AI provides a home for all of your datasets, features, labeling tasks, notebooks, trainings, experiments, model deployment, which is referred to as an endpoint in Vertex language, and more. Now, this sounds like a lot. It's because it is. But I, I think what Google Cloud is trying to do here is provide you a one-stop shop for all of your machine learning needs. Now, if you want to take Vertex AI for a spin, LAC has put together a hands-on write-up which steps through using Vertex AI to model Airbnb's New York City apartment rental data. The Practitioner's Guide to MLOps Whitepaper. Far out, the MLOps space is exploding. Ever wonder how all of the pieces of an ML project come together? Well, Google Cloud's Practitioner's Guide to MLOps whitepaper will help you out. It's one of the highest quality resources on MLOps I've ever come across. From data preprocessing to continuous training and monitoring, the whitepaper walks through principled workflows for the entire machine learning development process. If you're interested in building full-stack machine learning projects, I'd encourage you to read through this in its entirety. The next little subsection that we have is Community Guidebook 2.0 Understanding Your Data. First up is the new TensorFlow forum. Finally! A centralized place to discuss everything TensorFlow, from announcements, show and tell, share your work, you know, I always encourage you to do that, events, research, and more. The perfect place to interact with and learn from fellow TensorFlow developers. I imagine this as like a TensorFlow developer town square, on the internet, the People in AI Research Guidebook 2.0. So in last month's Machine Learning Monthly, the design edition, we covered Google's PAIR Guidebook. So People in AI Research, that's what PAIR stands for. Well, things move fast in the machine learning world, as you know, and version 2.0 of the guidebook is out with new and improved example use cases. I especially like the point explain the benefit, not the technology. So help users understand— and I don't like the— I actually don't like the term users— help people understand your product's capabilities rather than what's under the hood. They give the example to aim for and avoid. So you should aim for a description like, "Owl is an educational tool that adapts to your learning style and is available anytime to help you achieve your educational goals." Whereas you should avoid Al is an innovative AI-based chatbot that leverages a neural conversation model and natural language processing techniques. Because as engineers, we can get pretty, pretty hyped up about the technology we're using. However, does that help? Does the people who want to use the things that we've built, does it help them if they know that? They just want to know how it benefits them. Know your data. which is an exciting new tool that is currently in beta. But as you all know, data is key for any machine learning system. And I mean, there's a reason Andrej Karpathy lists, "Become one with the data," as the first step for training neural networks. Know Your Data is a tool for exploring, understanding, and improving quality, as well as mitigating fairness and bias issues in datasets. Very important. So check it out if you want to do any of those things with your dataset. I mean, right now the tool is only available for image-based datasets. TensorFlow datasets, but it looks like it'll be available soon for your own custom datasets. Now, of course, there are plenty more updates on machine learning and TensorFlow in Google's I/O. To learn more, I'd encourage you to read the blog post on TensorFlow's blog. That'll recap many of the specific updates at Google I/O 2021. And there's also a video on YouTube by Laurence Moroney of the top 10 AI and ML developer updates from Google I/O 2021. Check those out. Onto some exciting news from around the internet. Next generation pose detection with MoveNet and TensorFlow.js. So speaking of updates to TensorFlow.js, now you can use MoveNet, a state-of-the-art movement detection model that detects 17 key points of a body. I mean, I didn't even know I had 17 key points in my body. MoveNet has two variants, Thunder, which is for high accuracy, and Lightning, which is for high speed. And they can operate at up to 51 and 43 FPS respectively, live in the browser of an iPhone 12. That's amazing. Like in the browser of a mobile device. So there's some thought-provoking fitness style applications could be built here. Maybe a dance detector. Yo, yo, yo. Up next, we have datasets and code on arXiv. This is so exciting. So Papers with Code, one of my favorite machine learning websites, have partnered with arXiv, one of my favorite research websites, to bring datasets and code to machine learning research papers. For eligible papers, there's now a code and data tab to link datasets and code used within a specific paper. Now, this is a massive step in the right direction for reproducible machine learning. The only next step is that if only the compute resources were shared too. Facebook's latest adventure into unsupervised and self-supervised learning has produced Wav2Vec Unsupervised, or Wav2Vec-U for short. I much prefer that version. The model starts to learn the structure of speech using a self-supervised model. That was Wav2Vec 2.0. And then these representations of speech are used as the input to a generator portion of a GAN network. It's actually really exciting. It's the first time I've seen GAN networks used in something that isn't sort of such as generative machine learning, like generating faces of people and whatnot. The generator portion of the GAN network predicts a phoneme corresponding to a sound in language. Then the discriminator portion of the GAN network assesses whether the predicted sequence phonemes look real or not. Now, on the LibriSpeech benchmark, which is very common in speech detection, speech recognition, wav2vec-U performs on par, on par with state-of-the-art fully supervised systems. So these systems train on the LibriSpeech benchmark is almost 1,000 hours. I think it's like 960 hours of transcribed audio. 2 years ago. Now, this is very important because learning with less data provides a huge opportunity for spoken languages with far less data available than widely spoken languages. And I also very much like the quip at the end of the article. More generally, people learn many speech-related skills just by listening to others around them. This suggests that there is a better way to train speech recognition models, one that does not require large amounts of labelled data. Is a very big hint at the power of self-supervised learning. Up next, we have an outstanding blog post by RoboFlow, which is titled "What is Active Learning?" So Jeremy Howard, the amazing creator and teacher of fast.ai, mentioned that basically every practical machine learning team reinvents some form of active learning.
But there's people inside companies, anybody who actually has to solve a problem, they're going to innovate on active learning. Yeah, everybody kind of reinvents active learning when they actually have to work in practice because they start labeling things and they think, gosh, this is taking a long time and it's very expensive. And then they start thinking, well, why am I labeling everything? I'm only— the machine's only making mistakes on those two classes. They're the hard ones. Maybe I'll just start labeling those two classes. And then you start thinking, well, why did I do that manually? Why can't I just get the system to tell me which things are going to be hardest? It's an obvious thing to do.
Now, if you want a deeper dive on this, I'd I encourage you to read RoboFlow's blog post, which breaks down 3 of the most common types of active learning with the example of improving a box detection model. Up next, we have Reproducible Deep Learning by Simon Scarterpane. Now, I really hope I'm pronouncing that name right. If not, apologies. So throughout May, Simon ran a course on reproducible deep learning. You might be asking, what is reproducible deep learning? Well, take some data, model it with deep learning in some way, share your code and data with someone else, and get them to get the same results that you did. Sound easy? Well, it's surprisingly harder than you think. Simon's PhD-level course goes through steps you can perform to make your deep learning code reproducible, such as code versioning with Git, data versioning with DVC, which stands for Data Version Control, experiment logging with Weights and Biases, hyperparameter tuning and configuration with Hydra, and Dockerization— in other words, getting everything into a Docker container. So if you're looking at building reproducible machine learning systems rather than just running notebooks top to bottom, which is currently one of my main workflows, check out the course page for videos, slides, and code. Finally, we have an amazing post by Mark Sarafim. Again, I've tried— Mark's even told me how to pronounce his last name, and I'm probably getting it wrong again. But it's called The Rise of Hugging Face. In The Rise of Hugging Face, Mark writes about how companies like Hugging Face and Weights and Biases, two of my favorite machine learning companies, have built incredible value in the machine learning world by creating communities around their platforms. You know when you stumble upon a little piece of someone's work and then quickly consume everything they've ever created? That's what happened when I found Mark's writing. So for some of the best takes on machine learning and just learning in general, sign up for Mark's newsletter or follow him on Twitter. Whoa! As usual, an absolutely massive month on tour for the world of machine learning. Don't forget, if you would like to get future issues of Machine Learning Monthly delivered straight to your inbox, you can subscribe. The link will be in the description below. It'll also have all the links. So as always, keep machine learning, keep moving, keep creating, and keep dancing. I can taste you, yo, yo, yo. I can taste you.
More from Daniel

Small Language Models (SLMs) Are the Future: Fine-Tuning AI That Runs on Your iPhone

Introducing Sunny - A MedGemma-Powered Skin Health Tracking App (Kaggle Competition Entry)

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 4 - Comparing the results

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 3 - Running LLMs on the RTX 4090

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 2 - Formalizing the tests

Benchmarking: NVIDIA DGX Spark & NVIDIA RTX 4090 | Part 1 - Creating a series of tests

Local Multimodal RAG on the NVIDIA DGX Spark | Part 4 - Publishing our demo to Hugging Face

Local Multimodal RAG on the NVIDIA DGX Spark | Part 3 - Putting it all together


