Printing the layer gradients while training

I know that you can access the gradiens of a layer by using layer.grad. When I include this in a print statement, however, I get a continuous stream of None. How can I get the actual matrix of gradients?