name: Network in Network Imagenet Model
caffemodel: nin_imagenet.caffemodel
caffemodel_url: https://www.dropbox.com/s/cphemjekve3d80n/nin_imagenet.caffemodel?dl=1 license: BSD
caffe_commit: pull request yet to be merged
gist_id: d802a5849de39225bcc6
This model is a 4 layer Network in Network model trained on imagenet dataset.
Thanks to the replacement of fully connected layer with a global average pooling layer, this model has greatly reduced parameters, which results in a snapshot of size 29MB, compared to AlexNet which is about 230MB, it is one eighth the size.
The top 1 performance of this model on validation set is 59.36%, which is slightly better than AlexNet. (Using the average of 10 crops, (4 + 1 center) * 2 mirror, should obtain a bit higher accuracy.)
The training time of the model is also greatly reduced compared to AlexNet because of the faster convergence. It takes 4-5 days to train on a GTX Titan.
BSD
how to load it to python interface, I tried following but it raises error
net = caffe.Classifier(caffe_root + 'models/network_in_network/net_in_net.prototxt',
caffe_root + 'models/network_in_network/nin_imagenet.caffemodel')
IndexError Traceback (most recent call last)
in ()
1 net = caffe.Classifier(caffe_root + 'models/network_in_network/net_in_net.prototxt',
----> 2 caffe_root + 'models/network_in_network/nin_imagenet.caffemodel')
/home/retina18/Downloads/caffe/python/caffe/classifier.pyc in init(self, model_file, pretrained_file, image_dims, gpu, mean, input_scale, raw_scale, channel_swap)
41 self.set_channel_swap(self.inputs[0], channel_swap)
42
---> 43 self.crop_dims = np.array(self.blobs[self.inputs[0]].data.shape[2:])
44 if not image_dims:
45 image_dims = self.crop_dims
IndexError: list index out of range