When using ipython:
net = caffe.Classifier(MODEL_FILE, PRETRAINED)
I got an exception when I use the original train.prototxt as the pretrained_file(PRETRAINED)
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-5-af51e3c78bed> in <module>()
2 plt.rcParams['image.interpolation'] = 'nearest'
3 plt.rcParams['image.cmap'] = 'gray'
----> 4 net = caffe.Classifier(MODEL_FILE, PRETRAINED)
/home/xiayu/work/caffe/caffe-master/python/caffe/classifier.pyc in
__init__(self, model_file, pretrained_file, image_dims, mean, input_scale, raw_scale, channel_swap)
27
28 # configure pre-processing
---> 29 in_ = self.inputs[0]
30 self.transformer = caffe.io.Transformer(
31 {in_: self.blobs[in_].data.shape})
IndexError: list index out of range
I have no idea why in_ = self.inputs[0]
the index 0
is out of range, Here I know a specified deploy.prototxt may work, but I don't know how.
really hope some can answer my question!