import caffe
from caffe.proto.caffe_pb2 import NetParameter
with open('my.caffemodel', 'rb') as f:
netparam = NetParameter.FromString(f.read())
# then netparam.layer can be used to access the layers,
# and every layer message has a repeated field 'blobs'
# which contains the set of trainable params for that layer.
# e.g.: if layer [4] is a conv-layer,
# netparam.layer[4].blobs[0].data contains the filter kernels,
# netparam.layer[4].blobs[1].data contains the biases.