# K An implementation of a Convolutional Neural Network in Keras – MNIST dataset

# K An implementation of a Convolutional Neural Network in 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

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

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

Back to top of page.


Leave a Reply

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

3 × 2 =