any ideas on how to visualize the intermediate layers of a convolutional network? For example, say I have the following custom “network”
class MyNet(HybridBlock): def __init__(self,**kwards): HybridBlock.__init__(self,**kwards) with self.name_scope(): self.conv1 = gluon.nn.Conv2D(channels=16,kernel_size=3) self.conv2 = gluon.nn.Conv2D(channels=32,kernel_size=3) self.conv3 = gluon.nn.Conv2D(channels=32,kernel_size=3) def hybrid_forward(self,F,_input): x = self.conv1(_input) x = self.conv2(x) x = self.conv3(x) return x
and assume I’ve trained it with a loss function etc, so now the network is initialized and trained (the weights+bias are determined). Is there a way to visualize the self.conv2 or self.conv3 layers directly (by providing a batch of input images/data)? Or do I need to define another function that takes these layers and repeats the process of
hybrid_forward up to the layer I wish to visualize?