PyTorch GPU inference with Docker and Flask

GPU inference In a previous article, I illustrated how to serve a PyTorch model in a serverless manner on AWS lambda. However, currently AWS lambda and other serverless compute functions usually run on the CPU. But what if you need to serve your machine learning model on the GPU during your inference and the CPU just doesn’t cut it? In this article, I will show you how to use Docker to serve your PyTorch model for GPU inference and also provide it as a REST API.
Read more →

How To Unfreeze Vim

Sometimes it happens that Vim freezes / gets stuck / doesn’t react and you might wonder what is going on. Recently, I figured out that this happens for me when I accidentally pressed Ctrl + S. It turns out that this is an old legacy features back from the slow days of computing where ressources were really scarce and you sometimes wanted to freeze the output of one program to help with your ressources.
Read more →

PyTorch Model in Production as a Serverless REST API

PyTorch is great to quickly prototype your ideas and get up and running with deep learning. Since it is very pythonic, you can simply debug it in PyCharm as you are used to in regular Python. However, when it comes to serving your model in production the question arises: how to do it? There are many possibilities to do so, but in this post, you will learn how to serve it as a lambda function in a serverless manner on AWS.
Read more →

Graphical Explanation of Neural Networks and Gradients with Python

How does an artificial neuron work? Inspired by neurons of the human brain, an artificial neuron receives several input values. These input values are multiplied with the weights of the neuron which reflects that some input values are activating the neuron (positive weights) while others inhibit the neuron (negative weights). The product values are then summed and together create the activity a. Finally, a non-linear function is applied on a to yield the final output of the neuron.
Read more →

Debugging Tensorflow

Debugging Tensorflow Today, I am going to explore different ways to debug Tensorflow which can be a bit cumbersome at times. However, there are a few good possibilities that I know of to get more insight into the inner workings of Tensorflow. It’s a little more complicated than regular debugging like say in PyTorch where you can use an IDE like PyCharm and simply set breakpoints in your code to stop and inspect what’s going on.
Read more →
Follow me on twitter!