I'm running a Caffe framework (CPU) inside a docker container, with the following piece of code:
model_path = 'models/bvlc_googlenet/' # substitute your path here
net_fn = model_path + 'deploy.prototxt'
param_fn = model_path + 'bvlc_googlenet.caffemodel'
# Patching model to be able to compute gradients.
# Note that you can also manually add "force_backward: true" line to "deploy.prototxt".
model = caffe.io.caffe_pb2.NetParameter()
text_format.Merge(open(net_fn).read(), model)
model.force_backward = True
open('models/bvlc_googlenet/tmp.prototxt', 'w').write(str(model))
net = caffe.Classifier('tmp.prototxt', param_fn,
mean = np.float32([104.0, 116.0, 122.0]), # ImageNet mean, training set dependent
channel_swap = (2,1,0)) # the reference model has channels in BGR order instead of RGB
but, after having all model layers ignored, I' getting the following traceback:
libdc1394 error: Failed to initialize libdc1394
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0227 00:08:49.033560 122 net.cpp:49] Initializing net from parameters:
force_backward: true
state {
phase: TEST
}
I0227 00:08:49.033826 122 net.cpp:274] Network initialization done.
I0227 00:08:49.316442 122 upgrade_proto.cpp:52] Attempting to upgrade input file specified using deprecated V1LayerParameter: models/bvlc_googlenet/bvlc_googlenet.caffemodel
I0227 00:08:49.370679 122 upgrade_proto.cpp:60] Successfully upgraded file specified using deprecated V1LayerParameter
I0227 00:08:49.374241 122 net.cpp:752] Ignoring source layer data
I0227 00:08:49.374426 122 net.cpp:752] Ignoring source layer label_data_1_split
I0227 00:08:49.374480 122 net.cpp:752] Ignoring source layer conv1/7x7_s2
I0227 00:08:49.374514 122 net.cpp:752] Ignoring source layer conv1/relu_7x7
I0227 00:08:49.374563 122 net.cpp:752] Ignoring source layer pool1/3x3_s2
I0227 00:08:49.374616 122 net.cpp:752] Ignoring source layer pool1/norm1
I0227 00:08:49.374683 122 net.cpp:752] Ignoring source layer conv2/3x3_reduce
(for all layers)
Traceback (most recent call last):
File "dream.py", line 40, in <module>
channel_swap = (2,1,0)) # the reference model has channels in BGR order instead of RGB
File "/root/caffe/python/caffe/classifier.py", line 29, in __init__
in_ = self.inputs[0]
IndexError: list index out of range
could anyone please point me in the right direction?