Author: birosjh
-
Should Machine Learning Engineers Write Unit Tests?
If you are looking for a tl;dr, the answer is yes. I somehow seem to run into engineers fairly frequently that think there is nothing to test in machine learning code or at least can’t imagine where one might need a test. Generally speaking, the argument is something like “It’s just a model. You just…
-
Training on GPU with Libtorch and How to Use MPS
Arguably the most useful feature of deep learning libraries is their ability to move workloads to the GPU and PyTorch makes it very easy for users by providing a to() function that you can pass a device object to. The documentation doesn’t make it very clear about it, but actually Libtorch makes it just as…
-
Metric Tracking Options for Libtorch
For anyone reading articles on this website, I don’t think I need to stress the importance of logging metrics of ML models, but there aren’t very many options when it comes to Libtorch metric tracking. Things just aren’t quite as easy as they are with PyTorch. You could, of course, save everything to a csv…
-
Have You Thought About Using a Namespace in C++?
As someone originally coming from Python and then learning C++ later, namespaces were a new concept to me. For the longest time, I was interacting with the ones in the standard library, but not really writing my own. However, at one point I was working on a personal project (an emulator if you are interested!)…
-
PyTorch Lightning: How To Keep Your PyTorch Project Clean
As an engineer in perception and computer vision, I tend to work with PyTorch a lot. It’s a very flexible framework and there are already many useful components built into it that prevent you from having to build it yourself. However, if you have already built a few projects with it, you might have noticed…
-
A Starting Point for Learning Visual SLAM
If you are like me, you are probably fascinated by the idea of SLAM and since you are here reading Perception ML articles, you are probably even more excited about Visual SLAM. Along my path to become a better engineer, I have been doing some self-study about Visual SLAM.
-
Always Visualize A Batch From Your Data Loader
Here is one thing that every engineer working with AI hears at some point: Garbage In, Garbage Out However, despite that, something that I still see often enough in the Computer Vision industry and no doubt affects other machine learning disciplines as well is a complete lack of checking what is coming out of the…
-
Einops: Make Your Life Easier (Mostly)
When working in PyTorch, you are often faced with the need to manipulate tensors of multiple dimensions into various shapes or maybe combine dimensions together. There’s a wealth of functions specifically for that too. To name a few, view, permutate, stack, tile, and concat are some of the most common ones, but the list goes…
-
Oh, So There Are C++ Package Managers?
I know I have beaten this topic up a little bit in a previous post, but when coming from a language like Python, you really get comfortable with the idea of just using pip to install all of your modules. Need PyTorch? Just run pip install torch and you can use it as soon as…
-
CMake Prerequisite Knowledge for Developers Transitioning to C++
If you are like me and you come from coming to C++ from a background where you haven’t really used C++ before, the first thing you might notice is that dependency management is chaos. In Python, you just run pip install and in JavaScript you can simply use npm, and then (hopefully) it just works. …