In this Learning Path, you will build a convolution neural network model for image classification. You will train the model with CIFAR-10 dataset, one of the most popular image datasets, which contains 60,000 images with 10 different categories. The model takes an RGB image and predicts the category of the image.

Set up Anaconda

Anaconda is a Python distribution for data science and machine learning. With Anaconda, you can easily install open-source machine learning packages.

  1. Visit the Anaconda website and download the installer

  2. Run the installer with the default options

With Anaconda installed, you can install the necessary conda packages for data collection and machine learning, including Jupyter notebook .

Follow the steps as shown below:

  1. First open Anaconda Prompt

  2. Create an environment by typing:

    

        
        
            conda create -n ml_lab python=3.8
        
    
  1. Activate your environment by typing:
    

        
        
            conda activate ml_lab
        
    
  1. Add conda-forge channel to install packages:
    

        
        
            conda config --add channels conda-forge
        
    
  1. Then install python packages:
    

        
        
            conda install jupyter pandas tensorflow matplotlib numpy 
        
    
  1. Users have reported issues where the steps below result in dead kernel errors. To fix the problem, described as a GitHub issue , use:
    

        
        
            conda install nomkl
        
    

Get project files

Setup your development machine with the project files.

  1. Download the zip file containing the project files

  2. Unzip the files into a working folder

Open Jupyter Notebook

In the same environment you activated using Anaconda earlier, navigate to the above folder and enter:

    

        
        
            jupyter notebook lab.ipynb
        
    

You are now ready to train your first neural network model with TensorFlow and deploy the inference with STM Cube AI.

Back
Next