#008 TF An implementation of a Convolutional Neural Network in tf.keras – MNIST dataset

#008 TF An implementation of a Convolutional Neural Network in tf.keras – MNIST dataset

In this post we will see how we can classify handwritten digits using convolutional neural network implemented in Keras.

Required packages:

  • Numpy
  • Matplotlib
  • Keras
  • Tensorflow
  • Sklearn
  • Seaborn
  • __future__
  • Keras-vis

Table of Contents:

  1. Load the digit dataset
  2. Implementing a Neural Network
  3. Visualization
  4. Test our model
  5. Save a model as picture
  6. Activation Maps
  7. Saliency maps
  8. Activations

Now we can plot some predictions, to see how our model works.

Images for testing can be downloaded from the internet directly, using the following:

If we want to document our model, it can be great to see visually how it looks, and for that the following code can be used. After that, we will have the image with the required specification of our model.

the architecture of our network along with each layers on the convolutional neural network

Feature maps, or activation maps, are the output activations for a given filter and the definition is the same regardless of what layer you are on.

Feature map and activation map mean exactly the same thing. It is called an activation map because it is a mapping that corresponds to the activation of different parts of the image, and also a feature map because it is also a mapping of where a certain kind of feature is found in the image. A high activation means a certain feature was found.


In computer vision, a saliency map is an image that shows each pixel’s unique quality. The goal of a saliency map is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze.

Complete code you can see here.


In the next post we will learn about Yolo Object Detection.

More resources on the topic:

 

Leave a Reply

Your email address will not be published. Required fields are marked *