Category: C++

  • Libtorch GPU Training 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 when it comes to Libtorch, things just aren’t quite as easy as they are with PyTorch.  You could, of course, save everything to a csv file and then visualize it yourself later…

  • 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!)…

  • 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.

  • 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. …

  • Using YAML Files to Store Configurations for Your C++ ML Projects

    Anyone who’s been in ML for a while has had the pleasure of setting up a model only to realize that model parameters need to be passed as flags, but oh wait, there are a million parameters that need setting.  Soon after, you typically realize that you could just put all those parameters in a…

  • Setting up Libtorch in a Simple Docker Environment

    This article will cover how to make a reusable docker environment that you can use in all of your Libtorch projects. A couple of prerequisites: First, Let’s Setup Our Virtual Environment Whether you are programming in Python, C++, or really any other language, it never hurts to work inside of a virtual environment. Maybe you…

en_USEN