Boost Productivity with Keras Ecosystem

Rate this content
Bookmark

TensorFlow has built a solid foundation for various machine learning applications, on top of which the Keras ecosystem can really boost the productivity of the developers in building machine learning solutions. Keras has a simple and arbitrarily flexible API for building and training models. However, we still need a lot of manual work to tune the hyperparameters. Fortunately, with Keras Tuner, we can automate the hyperparameter tuning process with minor modifications to the code for building and training the models. To further boost the productivity, we introduce AutoKeras, which fully automates the model building, training, and hyperparameter tuning process. It dramatically reduces the amount of prior knowledge needed of using machine learning for some common tasks. All you need is to define the task and to provide the training data.

30 min
02 Jul, 2021

Video Summary and Transcription

This Talk introduces the TensorFlow in Keras ecosystem and highlights its features, including tensor manipulations, automatic differentiation, and deployment. It also discusses the workflow and automation of hyperparameter tuning with Keras Tuner and AutoKeras. The Talk emphasizes the simplicity and productivity of using AutoKeras, which supports various tasks and advanced scenarios. It also mentions the challenges beginners face and provides resources for learning. Lastly, it touches on the use of TensorFlow and Keras in the research domain and the customization options in AutoKeras, including time series forecasting.

Available in Español

1. Introduction to TensorFlow in Keras Ecosystem

Short description:

Hello, everyone. I'm very happy to be here at MLConf EU with you guys and thank you very much for the invitation. My presentation is about boost productivity with Keras ecosystem. We're going to highlight four features of TensorFlow. The first one is for tensor manipulations. The second feature is about automatic differentiation. Another important feature of TensorFlow is about deployment. It can be deployed anywhere for a model implemented with TensorFlow. TensorFlow is really about performance and scalability. But how do we really leverage the power of TensorFlow?

Hello, everyone. I'm very happy to be here at MLConf EU with you guys and thank you very much for the invitation. And my presentation is about boost productivity with Keras ecosystem.

So there are many members of the Keras ecosystem and the first one we're going to introduce is TensorFlow. I believe many of you guys have heard of it. It's a very powerful foundation for all the deep learning solutions built on top of it. But today, we're going to highlight four features of it for you to see how other members of the Keras ecosystem going to depend on these features to build something more.

The first one, we all know it's for tensor manipulations. As you can see, we have A and B as two by two matrix here, and you can do A plus B or C or exponential of D with them. This is supported by TensorFlow, or a source of mathematical operations on all those tensors. And the second feature we want to highlight is about automatic differentiation. It means you can calculate the gradients automatically without manually computing any of the derivatives on your own. Again, we have A and B as matrices, two by two. And the C is here, actually calculated from A and B. We got C. And now we want to calculate the gradient of C with respect to A. And you don't have to do any derivatives on your own, but by inserting these lines. With gradient tape, watch A, you can actually automatically calculate C, D, A, just by calling tape.gradientCA.

And another important feature of TensorFlow that's really used by any other library in the Keras ecosystem is about deployment. It can be deployed anywhere for a model that implemented with TensorFlow. For example, it can be deployed on servers with TensorFlow Extended. And it can be deployed on single-chip machines like Edge Devices with TensorFlow Lite, and also deploy on any web pages with tf.js. And moreover, TensorFlow is really about performance and scalability. So it runs on GPUs and TPUs for acceleration of all those medical operations on tensors. It also scales up to multiple servers with multiple GPUs and TPUs to make the training of the model really fast, and make the prediction for the model really fast, and deployment of the model really fast. And that's about TensorFlow. It's a very powerful mission for the Keras ecosystem.

But how do we really leverage the power of TensorFlow? As we saw, the API of TensorFlow is very low-level, consists of a lot of mathematical operations. You don't really want to implement a whole lot of deep learning solutions with all those mathematical operations, because each deep learning solution may involve hundreds of those mathematical operations. You don't want to write each one of them in your code on your own.

2. Keras: High-Level API for TensorFlow

Short description:

Keras is built on top of TensorFlow and provides high-level APIs that simplify deep learning. You can easily add layers to a sequential model and specify the number of neurons and activation functions. Loss calculations and training loops are handled automatically. Keras supports a wide range of tasks, from standard usage to advanced techniques like GANs and custom layers. For more complex scenarios, you can write custom metrics and losses, or even implement your own optimization algorithms using TensorFlow's low-level API.

So that's why we're going to go to the second member of the Keras, a radically productive deep learning. So for this one, it has actually built on top of TensorFlow and wrapping the TensorFlow low-level APIs into the high-level APIs, which are really simple to use.

We can see a very simple example code snippet here. We just initialize a sequential model, which is a type of model we're going to implement in Keras. And you can just keep adding those layers to the sequential model. Like here, we add a dense layer with 32 neurons, or units, in it, and activation function equal to Relu, and another dense layer to it. So then we got a model with two dense layers.

It's very simple to implement, and you don't really care about what mathematical operations are actually behind those dense layers, although it's actually matrix multiplication and additions, but you don't really need to write them on your own. You just use dense layer, and with a number of units. And also, you don't need to calculate the loss on your own. You just pass it as a string, categorical cross entropy. You don't do any calculations, but only a string.

This loss is actually for the classification task. And the model offset, you just passed in the training data. You don't need to write any loop on your own, like looping through 20 epochs. But you only pass in the data, and specify the epoch as 20. And then you start to do the predictions with the testing data. It's really simple to learn.

But despite the simplicity, it's capable of a lot of things. It's capable of everything supported by the TensorFlow low-level API. And you only need to learn what you need. We don't want the user to learn everything upfront that's quite a large learning curve. They start with a simple example like what we just showed before as a standard usage. You can use Sequential API, Function API, and Build and Layers.

But if you are aiming for something more, for example, you want to use TensorBoard and early stopping or saving the model to the disk with check pointing as you're training them, you can just pass a bunch of callback functions to the model. And it's really simple to do. But if you want something even more, like the GANS model or curriculum learning, and then you need to write some custom layers or custom metrics and custom losses, those are also very easy to implement just by extending the base classes in Keras.

But there are even more harder use cases, like learning to learn or you want to implement a new type of optimization algorithm, in that case, you will have to write your own training loop with the gradient tape operations. And with that, you are gaining full freedom of using anything supported with TensorFlow in Keras. So this is the logic of the API design of Keras.

3. Workflow and Keras Tuner

Short description:

You only learn what you need. The workflow consists of three steps and a loop: training the model, evaluating the model, and making changes to the model based on the evaluation results. The tedious manual work of hyperparameter tuning should be automated. Introducing Keras Tuner, an automated hyper-parameter tuning tool built on Keras. It's simple to use and only requires minor modifications to the code.

You only learn what you need. And after we know how to use Keras to build deep learning models, let's see a typical workflow of a machine learning engineer. So the workflow consists of three steps and a loop. The first step is here, you need to train a model with model.fit with the training data. And the second step is to evaluate the model. And just to evaluate it with validation data, like how much accuracy it can get for our classification tests. And then you will see whether the accuracy is good or not.

If it is not good, you probably want to change something about the model. Those are called hyperparameters. The hyperparameter can be the number of layers or the number of units in the advanced layer or the learning rate. After changing, you need to build a model again and train it again with the training data, which is in step one. Then we go to step two to observe the performance. And so we go through this loop again and again until we reach somewhere you've got a satisfiable accuracy. Like, for example, over 90%, you feel it's good enough for the deployment, you stop the loop and deploy the model.

But in our opinion, the tedious manual work should be automated. We are all developers. We all develop solutions to automate everything we can to save our time. So that's why we developed Keras Tuner, the third family member of Keras ecosystem. It's an automated hyper-parameter tuning. It's very simple to use. It's built on Keras and only requires minor modifications to the code. Again, this is the code example we just showed before how we use Keras. We have a sequential model we put in the layers, like the dense layer here with 32 units and 10 units. But now we probably don't think that 32 is a very good number for the number of units in the dense layer. We want to find that automatically what's the best value for the number of units in this dense layer. So we only need to change this one line into something that looks like this. We just have a HP instance hyper-parameter. We pass the name of the hyper-parameter and a mean value and a max value and the granularity of the hyper-parameter. It's very intuitive, very simple to modify the existing code of Keras. And then you start the search by initializing a tuner.

4. Automating the Loop with AutoKeras

Short description:

Here we use random search, which is a very simple search algorithm, of course. But we are having something better in Keras Tuner, like Bayesian optimization or hyperband. You can also use them. So now the loop is automated. We want them to directly have the solution and directly run the models. But how to use machine learning today is very different. We really want to reduce the learning curve of using machine learning. That's why we go to the fourth member of the family, which is called AutoKeras, an AutoML library for deep learning, to reduce the learning curve of really adopting machine learning in the real world applications. So let's see a very simple use case, as simple as three lines of code, to build a machine learning solution. And it is not requiring any machine learning background, actually, in this use case.

Here we use random search, which is a very simple search algorithm, of course. But we are having something better in Keras Tuner, like Bayesian optimization or hyperband. You can also use them.

Then you start to search by passing in the x train and y train as the training data and specified epochs and validation data. This is very simple to using the fit function of the model in Keras library. So now the loop is automated. You don't have to manually go through this loop again and again. And what we are thinking now is whether we can push this further to further automate this process. So we don't want the user even to be aware that the existence of this loop. We want them to directly have the solution and directly run the models.

So once Andrew Ng said AI is the new electricity, we all believe that. But now how we are using AI is very different from how we are using electricity. For example, how we are using electricity today is like when your phone battery is dead, you just plug it in your wall. I think everyone can do this. Everyone knows how to do this. But how to use machine learning today is very different. If you want to build a machine learning solution, you have to read a lot of textbooks and go through some online tutorials or even take some online courses in order to understand the algorithm behind those machine learning solutions. And by understanding those algorithms, you can start to know which model is best for your application. And then you can start to use those libraries to implement your machine learning solution. It's really hard to use. So we really want to reduce the learning curve of using machine learning.

And yeah, so that's why we go to the fourth member of the family, which is called AutoKeras, an AutoML library for deep learning, to reduce the learning curve of really adopting machine learning in the real world applications. So let's see a very simple use case, as simple as three lines of code, to build a machine learning solution. And it is not requiring any machine learning background, actually, in this use case. As you can see, we import AutoKeras as AK. And we initialize the image classifier, just for image classification tasks. And then you can call the fit function by passing in x and y. And no other arguments are specified here. You just throw in the training data. And then you can start the prediction by passing in the testing data.

5. AutoKeras Features and Deployment

Short description:

AutoKeras supports all the Keras arguments, including callback functions, tensor board, and checkpointing. You can specify the number of epochs or let AutoKeras tune it automatically. The models can be exported as Keras models and deployed anywhere supported by TensorFlow.

It's fairly simple to use. And there are also some nice features about. First one is here, you're supporting all the Keras tumor arguments here in image classifier. For example, you can limit the size of the model we are trying to give you so that you can deploy it on an edge device with limited memory space. And for the fit and predict function, we are actually supporting all the Keras arguments. So it means you can pass callback functions to the fit function. And you can use tensor board, and checkpointing, early stopping, everything support about callbacks with Auto Keras. And you can specify the number of epochs here. But here, we didn't specify it in the example. It means you can also choose not to specify it if you don't know how much, how many loops you should go through the training loop. And we will tune in automatically for you. So it means we really require least amount of knowledge in order to use this library. And moreover, we have a nice feature of exporting the model. Here you call automodel.exportmodel, you actually got a Keras model. And that Keras model can be saved on disk for future usage and deployment. And remember, everything is built on TensorFlow, so these models can be deployed anywhere that is supported by TensorFlow.

6. AutoKeras: Tasks and Advanced Usage

Short description:

AutoKeras supports various tasks, including image classification, regression, and more. It also handles complex scenarios like multi-model data and multi-task learning. For example, it can predict the price and occupancy of a house using both image and structure data. AutoKeras provides a simple interface, AutoModel, for specifying inputs and outputs. Advanced users can specify the search space for the model architecture using the functional API of Keras. They can connect different blocks, such as ResNet and ExceptionNet, and specify the merging and classification methods. AutoKeras supports different versions of ResNet and provides various other arguments for customization.

We're not only supporting image classifications. We're actually supporting six tasks in total, image classification, image regression, and also the same for task data and structure on classification and regression tasks. And more tasks to become are coming soon like object detection and image segmentation and time series forecasting. So you can expect that.

And besides those simple use cases, typical use cases, we are actually supporting some more complicated use cases like multi-model data and multi-task. This is closer to the real-world use case scenarios. For example, the image data can be a picture of a house and the structure data can be the attributes, some attributes of that house. For example, the total area of the house and the floor plans of the house. How many floors does it have? And the longitude or the latitude of the house where it's located. And in putting these information into the model, we want to do a regression, like predict the price of the house, and we want to do a classification of how many people should live in the house. And this scenario is actually supported by AutoKeras like this.

Again, it's very simple. Instead of using image classification, we're using another interface called AutoModel and you can pass the inputs and outputs to it. The inputs are just as shown in the figure in the previous slide. It's like an image input, a structure data input, and the output is just a regression head and classification head, very simple, they're intuitive to use. And you also call the fit function, but here it's multiple model data, so we are passing a list of X, the images and the structure data. And for multitasking, we are passing the regression targets and classification targets here. And that's for the multi-model and multitask.

And for advanced users, they may already know like what type of model is best for their solution, but they are not knowing all the details of every hyperparameter, so they want to roughly specify the search space, like the model should look like this, but without much details. So for example, the image data should use ResNet and ExceptionNet all together and merge the output together. And for structure data, we want to use multi-layer Perceptron and merge all of them together and do the regression and classification. So they should do something like this. It is exactly the same as the functional API of Keras. You can refer to the Kera functional API tutorials and learn it. But the idea is just connecting these blocks. ResNet block, ExceptionNet block, and the merge block, and classification how to regress and how you connect them together with this code. And notably, we're passing an argument here, which is version equal to v2. That means we will only search the v2 ResNet here in this block. But if you don't know which version is the best, you can choose not to pass it and leave it blank and we'll tune it automatically for you. And there are a whole lot of other arguments that are supported in the ResNet block, also other blocks.

7. Keras and TensorFlow Features

Short description:

We support neural network blocks like ResNet and ExceptionNet, as well as preprocessing blocks like normalization, categorical encoding, text factorization, and image augmentation. AutoKeras is an AutoML library for deep learning that allows you to implement simple solutions with just three lines of code. It supports multi-model data and multitasking, and is built on Keras TuneR for automated hyperparameter tuning. Keras is a productive deep learning solution library that is built on TensorFlow, allowing for deployment in various environments and scaling up to multiple servers and accelerators. We acknowledge Datalab from Texas A&M University and the Google Keras team for their support. Thank you to everyone for attending the talk.

And we are not only supporting neural network blocks like ResNet and ExceptionNet, we're also supporting some preprocessing blocks like normalization, categorical encoding, or text factorization as well, and image augmentation. So you can connect them all together to build end-to-end solution.

Yeah, and let's have a review of what we talked about today. The first thing is about the last thing we talked about is AutoKeras, AutoML library for deep learning. You can implement a very simple solution with three lines of code. And we're also supporting multi-model data and multitasking. And it has built on Keras TuneR, which is very simple to use automated hyper-family tuning library which is built on Keras. And with minor modification to the existing Keras code you can do the hyper-family tuning. And Keras is a radical productive deep learning solution library. Again, it's very simple to use and you don't need to learn everything upfront but to learn gradually as you are having more complicated use cases. Everything here are built on TensorFlow, a very powerful foundation. You can deploy the model in various environments and the scale of the model up to multiple servers, multiple GPU and TPUs to accelerate the training. And finally, I would like to acknowledge Datalab from Texas A&M University and Google Keras team for supporting the project about Keras. And thank you everyone for attending the talk. Thank you.

It's really great that you also covered what else inside of Keras and TensorFlow, right? Because I have a feeling that sometimes people just forget that it's not only optimizers and layers, right? So there's many things that you can be using in your projects.

Yes, yes. We actually cover a lot of tools and a lot of people only know Keras. So if they try out other tools in the Keras community, it will be much helpful for their work.

Yeah, yeah. And I also believe that, you know, it's almost like there was a discoverability use case, right? Once somebody started using one tool, they'd be like, hey, maybe there's something else inside my books, right? And it does definitely benefit the entire ecosystem, right? To pick up, like, new things.

Yes. Yeah, cool. So I have a couple of questions. So first question is coming from Didu. I hope I'm pronouncing it correctly. Hi, Feng. What was one of the main challenges of making Keras and deep learning in general accessible to developers and lowering the knowledge barrier? This is like not to auto Keras, but I guess like more broader question, basically, to you.

Yes. So currently, I believe it's already kind of very accessible to many of the developers in the community.

8. Challenges for Beginners and Resources

Short description:

Beginners face challenges due to limited background in math, statistics, and programming. Starting with easier projects like AutoKeras or taking beginner-level courses can be helpful. The TensorFlow and AutoKeras websites provide tutorials and examples. Francois shares examples on Twitter, and open source contributions are encouraged.

And, but the main challenge is still for beginners. For example, they have not very much mathematical background or statistics background or even limited programming experiences. In that way, I think it's still might be harder for them to get started. So even with the examples or documentation on the website. So in this way, I believe it will be more helpful for them to start with like either a easier project like autocarys or for them to take a more beginner level course in order to start. I think that's the only way maybe.

Nice, nice. And also the default TensorFlow website also has like many tutorials, right? The same goes to autocarys, if people can just click through right in the browser and get some results, so definitely good strategy. Yeah, and one more thing. There's also a Keras website, keras.io, that people can also check a lot of examples from there. Yeah, yeah, that's actually a good point that you're bringing this up, because as far as I remember, Francois was also like resharing quite a bunch of things like on Twitter. So right now if somebody has like a really cool example for keras or maybe how to use autocarys for this matter, they can also submit it like an open source, right, and this is gonna be accepted and maybe somebody gonna get the documentation famous, right? Yes. Nice.

QnA

Using TensorFlow and Keras in the Research Domain

Short description:

The popularity of TensorFlow and Keras in the research domain depends on the specific research area. While deep learning researchers often require more flexibility and face a learning curve when using TensorFlow and Keras, efforts are being made to address these challenges. Eager Execution in TensorFlow provides more flexibility and allows researchers to write Python functions and incorporate them into the execution graph. Keras does not officially support ONIX, but there are third-party tools available for exporting Keras models to ONIX. In terms of optimizing the architecture of neural networks, Keras includes both pre-trained models and models without pre-trained weights. The default strategy in AutoKeras is to explore a large search space by starting with known good models and then fine-tuning hyperparameters.

Okay, so the next question is coming from Sanchit, and this user is asking like, hey, what is the strategy to make a TensorFlow slash Keras more popular for research domain? So I guess there's like this opinion, and we're sure if it's like backed up because I've seen like a different numbers to support this one or to reject it, said there's like a bunch of people in research that use not TensorFlow, but like other frameworks. Is there like anything that you, like let's say when you're developing like auto keras, right, that you do in order to target research community, or how do you feel is Keras TensorFlow for research or not so much, right? What is your opinion?

It depends on what the research area is. Like if it says a research area not other than the deep learning researchers, then people can also easily use Keras and TensorFlow since they're usually use the most popular models which are easily supported in TensorFlow or Keras. And, but for deep learning researchers, they usually do something crazy about tweaking the models to their own needs. For this flexibility is, I have to admit there are still some learning curves for them to get started with TensorFlow and Keras, but we are working hard on that. And that's definitely one of our highest priority of the team, and so currently, we are supporting Eager Execution. So you can have a kind of a similar effect as using Python, you can write Python functions and make it part of a TensorFlow operation and make it part of the execution graph. So that's also give a lot of flexibility to the research community.

Yeah, it's definitely a good point, right? Because I guess TensorFlow 1.X, right, or Keras before that, was also very static on the graph. And now, this Eager Execution or Eager by default from 2.X, this is very simple. And what you showed also in your example is a gradient tape, you can go very flexible. And I think, Francois, again, sharing many examples how you can customize your models and everything from distribution and going into handling data inputs that are already handled for you. And as a researcher, you do need to handle everything. Because sometimes, when I read also PyTorch code, I have a feeling that people, I mean, it is flexible, but it also has a cost, right? A price to pay that you need to handle those things on your own, right?

Cool. Another question is coming from Walter. And he's asking, hey, is Keras also targeting ONIX? Is there like a support? But it feels like, for me, that getting things working with ONIX is kind of hit or miss. Currently, we are not officially supporting it with any of the developers from Google. But we are relying on the open source community to support it. I believe there are some third-party tools, just for supporting how you can export the Keras model to ONIX model.

Another question is coming from Bernhard. Bernhard actually had yesterday lightning talk on AutoML. And he's asking today, like, hey, how does Keras optimize the architecture of the neural net? Or does it just find the best matching pre-trained network? Both are included. Both pre-trained model and models without pre-trained weights are included. We are trying to explore a large search space by starting the search with some warm startups. Like, we already know some good models, like ResNet and EfficientNet with pre-trained weights and some smaller vanilla convolutions. We just start the search with several good models we already know. Then we will start exploiting the details of the hyperparameters, like the optimizer and learning rate. And that's the default strategy of AutoKeras right now. I believe it's most suitable for most of the use cases, but you can always change other strategies like random search, hyperband and Bayesian optimization.

Customizing Models and Time Series Forecasting

Short description:

AutoKeras allows users to specify the block structure and the depth and width of the network. The search space is limited, but it includes the most popular models and their hyperparameters. Users can configure their own models based on the available options. Additional ideas and issues can be shared on AutoKeras GitHub. A basic version of time series forecasting with AutoKeras is expected to be available by the end of the year, with full support for categorical and numerical data.

I believe it's most suitable for most of the use cases, but you can always change other strategies like random search, hyperband and Bayesian optimization.

Maybe just if I follow up from my side on this question, let's say like if you do, I don't know, like ResNet, right, or Inception, there's like some particular blocks, right, of the network that can't be like reused, like all across the board, right. When you do your own network construction, right, do you kind of reuse those blocks and after it's more like about Skip Connection, right, and architecture? Or you're also giving, you know, enough freedom, right, to also design like what block structure you're gonna use, right? Like how deep you go like in your optimizations or how wide, basically? The user can specify that. But the search space is still kind of limited, not infinite. So we are including the most, our hyperparameters of all those popular models inside the search space. But for ResNet, we're not like having infinite number of ResNet, but only like all the combinations of the hyperparameters will consist of like about 100 different ResNet models. And we believe that should be good enough for a user to search and for them to configure their own.

Yeah, nice, nice. It's very good. And in general, I guess if somebody has any additional ideas, they can still create issues like an AutoKeras in GitHub, right? And after you can always reuse them and see like what's happening. Maybe a last short question from Miguel. Miguel is asking like, hey, when can we expect possibility for a time series for a casting with AutoKeras? We hopefully, we will have a basic version done by the end of this year. Currently, actually, it does usable in the latest release but we didn't put it into the documentation because it's not stable enough and it doesn't support categorical data. And by the end of this year, we expect the full version that supports both categorical data and numerical data and the time series for casting. Nice, amazing. Thank you again for answering all those questions but also for delivering this talk for us. It was pleasure listening to you.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

6 min
Charlie Gerard's Career Advice: Be intentional about how you spend your time and effort
Featured Article
When it comes to career, Charlie has one trick: to focus. But that doesn’t mean that you shouldn’t try different things — currently a senior front-end developer at Netlify, she is also a sought-after speaker, mentor, and a machine learning trailblazer of the JavaScript universe. "Experiment with things, but build expertise in a specific area," she advises.

What led you to software engineering?My background is in digital marketing, so I started my career as a project manager in advertising agencies. After a couple of years of doing that, I realized that I wasn't learning and growing as much as I wanted to. I was interested in learning more about building websites, so I quit my job and signed up for an intensive coding boot camp called General Assembly. I absolutely loved it and started my career in tech from there.
 What is the most impactful thing you ever did to boost your career?I think it might be public speaking. Going on stage to share knowledge about things I learned while building my side projects gave me the opportunity to meet a lot of people in the industry, learn a ton from watching other people's talks and, for lack of better words, build a personal brand.
 What would be your three tips for engineers to level up their career?Practice your communication skills. I can't stress enough how important it is to be able to explain things in a way anyone can understand, but also communicate in a way that's inclusive and creates an environment where team members feel safe and welcome to contribute ideas, ask questions, and give feedback. In addition, build some expertise in a specific area. I'm a huge fan of learning and experimenting with lots of technologies but as you grow in your career, there comes a time where you need to pick an area to focus on to build more profound knowledge. This could be in a specific language like JavaScript or Python or in a practice like accessibility or web performance. It doesn't mean you shouldn't keep in touch with anything else that's going on in the industry, but it means that you focus on an area you want to have more expertise in. If you could be the "go-to" person for something, what would you want it to be? 
 And lastly, be intentional about how you spend your time and effort. Saying yes to everything isn't always helpful if it doesn't serve your goals. No matter the job, there are always projects and tasks that will help you reach your goals and some that won't. If you can, try to focus on the tasks that will grow the skills you want to grow or help you get the next job you'd like to have.
 What are you working on right now?Recently I've taken a pretty big break from side projects, but the next one I'd like to work on is a prototype of a tool that would allow hands-free coding using gaze detection. 
 Do you have some rituals that keep you focused and goal-oriented?Usually, when I come up with a side project idea I'm really excited about, that excitement is enough to keep me motivated. That's why I tend to avoid spending time on things I'm not genuinely interested in. Otherwise, breaking down projects into smaller chunks allows me to fit them better in my schedule. I make sure to take enough breaks, so I maintain a certain level of energy and motivation to finish what I have in mind.
 You wrote a book called Practical Machine Learning in JavaScript. What got you so excited about the connection between JavaScript and ML?The release of TensorFlow.js opened up the world of ML to frontend devs, and this is what really got me excited. I had machine learning on my list of things I wanted to learn for a few years, but I didn't start looking into it before because I knew I'd have to learn another language as well, like Python, for example. As soon as I realized it was now available in JS, that removed a big barrier and made it a lot more approachable. Considering that you can use JavaScript to build lots of different applications, including augmented reality, virtual reality, and IoT, and combine them with machine learning as well as some fun web APIs felt super exciting to me.


Where do you see the fields going together in the future, near or far? I'd love to see more AI-powered web applications in the future, especially as machine learning models get smaller and more performant. However, it seems like the adoption of ML in JS is still rather low. Considering the amount of content we post online, there could be great opportunities to build tools that assist you in writing blog posts or that can automatically edit podcasts and videos. There are lots of tasks we do that feel cumbersome that could be made a bit easier with the help of machine learning.
 You are a frequent conference speaker. You have your own blog and even a newsletter. What made you start with content creation?I realized that I love learning new things because I love teaching. I think that if I kept what I know to myself, it would be pretty boring. If I'm excited about something, I want to share the knowledge I gained, and I'd like other people to feel the same excitement I feel. That's definitely what motivated me to start creating content.
 How has content affected your career?I don't track any metrics on my blog or likes and follows on Twitter, so I don't know what created different opportunities. Creating content to share something you built improves the chances of people stumbling upon it and learning more about you and what you like to do, but this is not something that's guaranteed. I think over time, I accumulated enough projects, blog posts, and conference talks that some conferences now invite me, so I don't always apply anymore. I sometimes get invited on podcasts and asked if I want to create video content and things like that. Having a backlog of content helps people better understand who you are and quickly decide if you're the right person for an opportunity.What pieces of your work are you most proud of?It is probably that I've managed to develop a mindset where I set myself hard challenges on my side project, and I'm not scared to fail and push the boundaries of what I think is possible. I don't prefer a particular project, it's more around the creative thinking I've developed over the years that I believe has become a big strength of mine.***Follow Charlie on Twitter
ML conf EU 2020ML conf EU 2020
41 min
TensorFlow.js 101: ML in the Browser and Beyond
Discover how to embrace machine learning in JavaScript using TensorFlow.js in the browser and beyond in this speedy talk. Get inspired through a whole bunch of creative prototypes that push the boundaries of what is possible in the modern web browser (things have come a long way) and then take your own first steps with machine learning in minutes. By the end of the talk everyone will understand how to recognize an object of their choice which could then be used in any creative way you can imagine. Familiarity with JavaScript is assumed, but no background in machine learning is required. Come take your first steps with TensorFlow.js!
React Advanced Conference 2021React Advanced Conference 2021
21 min
Using MediaPipe to Create Cross Platform Machine Learning Applications with React
Top Content
This talk gives an introduction about MediaPipe which is an open source Machine Learning Solutions that allows running machine learning models on low-powered devices and helps integrate the models with mobile applications. It gives these creative professionals a lot of dynamic tools and utilizes Machine learning in a really easy way to create powerful and intuitive applications without having much / no knowledge of machine learning beforehand. So we can see how MediaPipe can be integrated with React. Giving easy access to include machine learning use cases to build web applications with React.
JSNation 2022JSNation 2022
36 min
Build a 3D Solar System with Hand Recognition and Three.js
Top Content
We live in exciting times. Frameworks like TensorFlowJS allow us to harness the power of AI models in the browser, while others like Three.js allow us to easily create 3D worlds. In this talk we will see how we can combine both, to build a full solar system, in our browser, using nothing but hand gestures!
JSNation Live 2021JSNation Live 2021
39 min
TensorFlow.JS 101: ML in the Browser and Beyond
Discover how to embrace machine learning in JavaScript using TensorFlow.js in the browser and beyond in this speedy talk. Get inspired through a whole bunch of creative prototypes that push the boundaries of what is possible in the modern web browser (things have come a long way) and then take your own first steps with machine learning in minutes. By the end of the talk everyone will understand how to recognize an object of their choice which could then be used in any creative way you can imagine. Familiarity with JavaScript is assumed, but no background in machine learning is required. Come take your first steps with TensorFlow.js!
ML conf EU 2020ML conf EU 2020
32 min
An Introduction to Transfer Learning in NLP and HuggingFace
In this talk I'll start introducing the recent breakthroughs in NLP that resulted from the combination of Transfer Learning schemes and Transformer architectures. The second part of the talk will be dedicated to an introduction of the open-source tools released HuggingFace, in particular our Transformers, Tokenizers and Datasets libraries and our models.

Workshops on related topic

JSNation Live 2021JSNation Live 2021
81 min
Intro to AI for JavaScript Developers with Tensorflow.js
Workshop
Have you wanted to explore AI, but didn't want to learn Python to do it? Tensorflow.js lets you use AI and deep learning in javascript – no python required!
We'll take a look at the different tasks AI can help solve, and how to use Tensorflow.js to solve them. You don't need to know any AI to get started - we'll start with the basics, but we'll still be able to see some neat demos, because Tensorflow.js has a bunch of functionality and pre-built models that you can use on the server or in the browser.
After this workshop, you should be able to set up and run pre-built Tensorflow.js models, or begin to write and train your own models on your own data.
ML conf EU 2020ML conf EU 2020
160 min
Hands on with TensorFlow.js
Workshop
Come check out our workshop which will walk you through 3 common journeys when using TensorFlow.js. We will start with demonstrating how to use one of our pre-made models - super easy to use JS classes to get you working with ML fast. We will then look into how to retrain one of these models in minutes using in browser transfer learning via Teachable Machine and how that can be then used on your own custom website, and finally end with a hello world of writing your own model code from scratch to make a simple linear regression to predict fictional house prices based on their square footage.
ML conf EU 2020ML conf EU 2020
112 min
The Hitchhiker's Guide to the Machine Learning Engineering Galaxy
Workshop
Are you a Software Engineer who got tasked to deploy a machine learning or deep learning model for the first time in your life? Are you wondering what steps to take and how AI-powered software is different from traditional software? Then it is the right workshop to attend.
The internet offers thousands of articles and free of charge courses, showing how it is easy to train and deploy a simple AI model. At the same time in reality it is difficult to integrate a real model into the current infrastructure, debug, test, deploy, and monitor it properly. In this workshop, I will guide you through this process sharing tips, tricks, and favorite open source tools that will make your life much easier. So, at the end of the workshop, you will know where to start your deployment journey, what tools to use, and what questions to ask.
ML conf EU 2020ML conf EU 2020
146 min
Introduction to Machine Learning on the Cloud
Workshop
This workshop will be both a gentle introduction to Machine Learning, and a practical exercise of using the cloud to train simple and not-so-simple machine learning models. We will start with using Automatic ML to train the model to predict survival on Titanic, and then move to more complex machine learning tasks such as hyperparameter optimization and scheduling series of experiments on the compute cluster. Finally, I will show how Azure Machine Learning can be used to generate artificial paintings using Generative Adversarial Networks, and how to train language question-answering model on COVID papers to answer COVID-related questions.