Skip to content

Instantly share code, notes, and snippets.

Evan Shelhamer shelhamer

Block or report user

Report or block shelhamer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
shelhamer /
Last active May 11, 2019
Load binary proto .caffemodel to inspect layer names.
import sys
sys.path.insert(0, 'python/')
import caffe
from caffe.proto import caffe_pb2
net_param = caffe_pb2.NetParameter()
net_str = open('lenet_iter_5000.caffemodel', 'r').read()
print net_param.layer[0].name # first layer
import sys
import numpy as np
import caffe
# take args for model arch (prototxt), input/output models (binaryproto ),
# layer name, and channel permutation.
arch_f, in_f, out_f = sys.argv[1:4]
layer = sys.argv[4]
You can’t perform that action at this time.