Help Center/ Atlas 300 Application (Model 3000)/ Model Conversion Guide/ FAQs/ What Do I Do If the Error "It is recommended to convert layers-structure to layer-structure by caffe tool" Is Reported During Model Conversion?
Updated on 2022-03-13 GMT+08:00

What Do I Do If the Error "It is recommended to convert layers-structure to layer-structure by caffe tool" Is Reported During Model Conversion?

Symptom

The .prototxt and .caffemodel files of GoogLeNet downloaded from https://github.com/BVLC/caffe/tree/master/models/bvlc_googlenet fail to be imported, as shown in Figure 1.

Figure 1 Model conversion error message

The convertModel.log file shows the following error information.

[ERROR] FMK:2018-12-22-23:47:48.147.318 ConvertNetParameter:framework/domi/omg/parser/caffe/caffe_parser.cpp:776:"The weight file is consisted of layers-structure which is deprecated in caffe and unsupport in OMG. It is recommended to convert layers-structure to layer-structure by caffe tool. Error Code:0xFFFFFFFF(failed)"

Solution

It is because the .prototxt and .caffemodel files have to be upgraded to the latest by using tools provided by Caffe. You can obtain the Caffe tools from Link.

  1. Download the upgrade_net_proto_text and upgrade_net_proto_binary tools to any directory on the Mind Studio server.
  2. Compile and obtain tools upgrade_net_proto_text and upgrade_net_proto_binary by referring to Link.
  3. Use the upgrade_net_proto_text tool to upgrade the .prototxt file.

    upgrade_net_proto_text model_old.prototxt model_new.prototxt

  4. Use the upgrade_net_proto_binary tool to upgrade the .caffemodel file.

    upgrade_net_proto_binary model_old.caffemodel model.new.caffemodel

  5. Use the upgraded .protoxt file and .caffemodel file to import the model again.