Visualizing Images that Maximally Activate a Neuron

I was wondering if in Pytorch, there’s a way in to select images that maximally activate certain neurons from one of the convolutional layers.

Can anyone point me to a good resource material that teaches you how to do this?