rahatsantosh / ZFNet

Implementation of the ZFNet model and convnet visualization.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZFNet Model Implementation

Visualizing and Understanding Convolutional Networks

Dataset

In the paper, the authors have trained the model on Imagenet dataset, but due to memory and processing constraints the model here has been trained on the CIFAR100 dataset

Model

The proposed model is a variation of the Alexnet module. Since the only change is in the first convolutional layer of the model, hence here all pretrained weights, of the alexnet module have been downloaded and used, and the training has been done only on the first CNN layer and the final Dense Linear layer.

Convnet Visualization

For feature visualization, the top 9 activations for each given layer is projected seperately back to the input space, which reveals the various different structures that excite a given feature map. This is done by setting all other activations in the layer to zero and the successively

  1. unpool
  2. rectify
  3. filter
to reconstruct the activations all the way back to the input pixel space.

The deconvnet function does this only for the 5th convolutional layer, and can be modified to do the same for subsequent convolutions by mapping the corresponding convolutions to transpose convolution functions.


About

Implementation of the ZFNet model and convnet visualization.


Languages

Language:Python 100.0%