I just loaded alexnet in caffe using predefined prototxt and caffemodel files. However sending any image to the model returns the same value as output of fc7 layer.
Here is the code snippet:
net=caffe.Net('alexnet/train_val.prototxt','alexnet/bvlc_alexnet.caffemodel',caffe.TEST)
for image in images:
im = np.array(caffe.io.load_image(image, color=True)).squeeze()
im_input = im[np.newaxis, np.newaxis, :, :]
net.blobs['data'].reshape(*im_input.shape)
net.blobs['data'].data[...] = im_input
net.forward()
fc = net.blobs['fc7'].data
print(fc)#Always produces the same output