Hinton diagram

The Hinton diagram is a 2D plot for visualizing weight matrices in deep-learning applications. Matplotlib does not have a direct method to plot this diagram. So, we will have to write code to plot this. The weight matrix for this is taken from one of the machine learning algorithms that classifies images.