Visualizing the FC layers


I have trained a network. I want to visualize the output of each layers when I forward pass an image. I can see how i can visualize the intermediate layers as they are already in (heightwidthchannels). When it comes to the fully connected they are (samples * 1d vector). How will i reconstruct this back to (samples * height * width) format so that I can visualize what features it has learnt.

Thanks in advance for the help

check the deepdream by google which basically generate image that specifically activates certain neuron

  1. (matlab)
  2. (tensorflow)

I couldn’t find the PyTorch version.

There are several third party implementations. You could have a look at this to begin with.