To obtain an impression of what a neuron encodes, truncate the network at the given layer and attach layers that extract the total square activity of the specified neurons:
["Input"] command provides the backpropagation gradient at the input port of our network. The following function normalizes the maximum gradient coefficient to 1/8 and converts it into an image:
Incorporating a random jitter into the following loop helps to spread out local artifacts of the backpropagation and promotes a more regularized image: