NOTE: This functionality is deprecated and will be removed in the future releases.
Model Optimizer can register custom layers in a way that the output shape is calculated by the Caffe* framework installed on your system. This approach has several limitations:
SimplerNMS
is filtering out bounding boxes that do not satisfy the condition. Internally, Caffe fallback forwards the whole net without any meaningful data - just some noise. It is natural to get only one bounding box (0,0,0,0) instead of expected number (for example, 15). There is an option to patch Caffe accordingly, however, it makes success of Intermediate Representation generation on the patched Caffe on the particular machine. To keep the solution independent from Caffe, we recommend to use extensions mechanism for such layers described in the Model Optimizer Extensibility.NOTE: Caffe Python* API has an issue when layer name does not correspond to the name of its top. The fix was implemented on BVLC Caffe*. The Caffe framework on your computer must contain this fix. Otherwise, Caffe framework can unexpectedly fail during the fallback procedure.
NOTE: The Caffe fallback feature was validated against this GitHub revision. You may have issues with forks or later Caffe framework versions.
CustomLayersMapping.xml
: CustomLayersMapping.xml
: Where:
${Type}
is a type of the layer in the Caffe${has_params}
is "true" if the layer has parameters, and is "false" otherwise${layer_param}
is a name of the layer parameters in caffe.proto
if the layer has itExample:
Proposal
layer has parameters, and they appear in the Intermediate Representation. The parameters are stored in the proposal_param
property of the layer: PYTHONPATH
to let it be imported from the Python program: If Caffe was installed correctly, the caffe
module is imported without errors.