Caffe – Deprecation warning

Depending upon application, you may find that Caffe is showing following warning:

W1119 09:42:45.634932 11888 _caffe.cpp:139] DEPRECATION WARNING - deprecated use of Python interface
W1119 09:42:45.634954 11888 _caffe.cpp:140] Use this instead (with the named "weights" parameter):
W1119 09:42:45.634958 11888 _caffe.cpp:142] Net('deploy.prototxt', 1, weights='bvlc_reference_caffenet.caffemodel')
I1119 09:42:45.636143 11888 net.cpp:53] Initializing net from parameters:

At the time writing this text, Caffe ( sample applications are also showing this warning.

It happens because caffe.Net interface parameters are not passed correctly:

net = caffe.Net(prototxt_file, weight_file, caffe.TEST)

To fix this warning, parameters passed to caffe.Net needs shuffling

net = caffe.Net(prototxt_file, caffe.TEST, weights=weight_file)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s