How to make Hinton diagrams

I just started studying machine learning with Mathematica and, I want to know how to create Hinton diagrams in Wolfram. Can any one give an idea, please?