I'm having some trouble loading a caffemodel in python. I'm just trying to get access to the network right now so I've compiled the protobuf file to caffe_pb2. I'm using the caffemodel available from
here for this. Here's what I've got:
import caffe_pb2
model = open('yu-koltun-net.caffemodel', 'rb')
binary_content = model.read()
protobuf = caffe_pb2.NetParameter()
protobuf.ParseFromString(binary_content)
layers = protobuf.layers
# now see if there are any layers
print len(layers) # outputs 0
How are there no layers? Is this the wrong way to read a caffemodel file? I know I can do
import caffe
net = caffe.Net('yu-koltun-net.prototxt', 'yu-koltun-net.caffemodel', caffe.TEST)
but I just want to access some information about the layers.