Category: Machine Learning

  • Tensorflow: training loop from scratch

    Tensorflow: training loop from scratch

    The deep learning model has model weights which start from a random state wen the model object is created. As we expose the model with the training data, the weights are modified such that their mathematical operations produce values close to the training labels. Following are the major things that happen during training: If we…

  • How to save python objects using joblib

    Often times you would want to save python objects for later use. For example, a dataset you constructed which could be used for several projects, or a transformer object with specific parameters you want to apply for different data, or even a machine learning learning model you trained. This is how to do it. First,…

  • Tensorflow: The History object

    To train a tensorfow model, we call the fit() method of the model as follows: Python The fit() method returns something called as a History object. It stores the epochwise values of the loss and any metrics we have asked the model to track. These records can be used to visualize how the training process occurred and potentially help us modify…

  • Tensorflow: Basic deep learning workflow for classification task

    In our first project of tensorflow, we used the fashion-mnist data to make a simple deep learning model to identify whether any given image is of a trouser or a bag. We labelled the trouser images as class 0, and images of bag as class 1. In our neural network, the last output layer was as follows: Python As…

  • Tensorflow: The first project

    We will try to build a deep learning model that differentiates between images of two kinds of objects. For this we will use the fashion mnist data which could be readily used from the keras API included with tensorflow. First import the necessary packages. Python Read data included in the keras library. Python Let’s first see the size…