I've been trying to visualize internal activations in CNN and came across this paper: "Visualizing and Understanding Convolutional Networks" by Zeiler & Fergus.
In the paper they mentioned reconstructing the input image from internal convnet activations using deconvnet. Specifically, on reversing the convolutional (filter) layers, they said:
To invert this, the deconvnet uses transposed versions of the same filters, but applied to the rectified maps, not the output of the layer beneath. In practice this means flipping each filter vertically and horizontally.
I believe they are referring to just a simple transposed convolution operation, since convolution with flipped weights is equivalent to applying the transposed convolution operation.
My question is that transposed convolution is not an inverse of the convolution operation. This simple snippet shows just that:
import torch
import torch.nn as nn
i = torch.randn((10,10)).unsqueeze(0)
c = nn.Conv2d(1, 1, 2, bias=False)
ct = nn.ConvTranspose2d(1, 1, 2, bias=False)
ct.weight = nn.Parameter(c.weight)
torch.isclose(i, ct(c(i)) # not true
So I don't really understand how they claim that the output from deconvnet is a representation of the internal activations of the convnet.