Tag: machine learning

  • How to resize an image with Tensorflow tf.image.resize()

    How to resize an image with Tensorflow tf.image.resize()

    When dealing with training data, you often need to resize images to a fixed size, according to the architecture of the machine learning model that you want to use. In Tensorflow we can use tf.image.resize() to resize images to different resolutions. The method controls the different algorithms that we can use for resizing. You can […]

  • Tensorflow not detecting GPU

    Tensorflow not detecting GPU

    If TensorFlow doesn’t detect your GPU, it will default to the CPU, which means when doing heavy training jobs, these will take a really long time to complete. This is most likely because the CUDA and CuDNN drivers are not being correctly detected in your system. I am assuming that you have already installed Tensorflow […]

  • Does CUDA 11.6 work with Tensorflow?

    Does CUDA 11.6 work with Tensorflow?

    The short answer is No. The latest Tensorflow, which is currently Tensorflow 2.9, is not yet ready to work with CUDA 11.6. If you check the Tensorflow compatibility matrix below you will find that as of today the recommended CUDA version you should install is 11.2: Version Python version Compiler Build tools cuDNN CUDA tensorflow-2.9.0 […]

  • How to setup Tensorflow on Ubuntu Linux with multiple GPUs using Docker

    How to setup Tensorflow on Ubuntu Linux with multiple GPUs using Docker

    For this tutorial, I will be setting up the latest version of Tensorflow, currently 2.9 with GPU support on a workstation kindly provided by SabrePC with 4 x RTX 3080. For those curious, here is a clip of what this workstation looks like: Setting up Tensorflow typically requires a lot of hard work as you […]

  • Python Exercise for Beginners – Implementing One Hot Encoding

    Python Exercise for Beginners – Implementing One Hot Encoding

    In today’s Python exercise we will create a one-hot encoding algorithm to convert categorical data to a numerical format. The reason why we need to do this is that machine learning algorithms only can deal with numbers, not strings. What is One Hot Encoding? One-hot encoding is a way of representing categorical information in binary […]

  • Reducing 90% in costs with Spot VMs for Machine Learning on Google Kubernetes Engine in GCP

    Reducing 90% in costs with Spot VMs for Machine Learning on Google Kubernetes Engine in GCP

    When running big machine learning training jobs using neural networks, you need a GPU. And let’s be honest, GPUs are expensive and hard to get nowadays with the chip shortage! So it is unlikely that you will have plenty of spare GPUs lying around. This is why it makes sense to rent GPUs on the […]

  • How to crop and resize an image using Tensorflow.js tf.image.cropAndResize

    How to crop and resize an image using Tensorflow.js tf.image.cropAndResize

    This is a quick post to show how you can use tf.image.cropAndResize to crop and resize an image to a square using the function tf.image.cropAndResize. This function was created for a specific purpose to cutout the bounding boxes given by a face detection algorithm. But you can use it for other purposes too! Your image […]

  • How to Render a Panda Data Frame as HTML

    How to Render a Panda Data Frame as HTML

    Sometimes it might be useful to convert a Panda Dataframe to HTML. For instance, you might want to render a panda data frame inside a web page, outside Jupyter Notebook. You can do this by calling the df.to_html() function. Where df is the Panda data frame that you would like to render. Let’s first create […]

  • From a 2D Photo to a 3D Model with Nvidia Ganverse3D with Nvidia Omniverse Create

    From a 2D Photo to a 3D Model with Nvidia Ganverse3D with Nvidia Omniverse Create

    Remember that a few months ago I talked about a new ground-breaking application, yet to be released, from Nvidia Research Labs, called GanVerse3D, capable of rendering 3D models with texture from 2D photos?  Not only that, GanVerse3D was also supposed to be capable of animating the 3D model at a click of a button. Yes, […]

  • How to install Tensorflow 2.5 with CUDA 11.2 and CuDNN 8.1 for Windows 10

    How to install Tensorflow 2.5 with CUDA 11.2 and CuDNN 8.1 for Windows 10

    In this article, I am going to show you how you can install Tensorflow 2.5, CUDA 11.2.1, and CuDNN 8.1, for Windows 10, with full support for an Nvidia GPU RTX 30 series card. Since CUDA is backward compatible it should also work for RTX 20 series cards or older. But before I install CUDA, […]