Help Center> ModelArts> FAQs> Model Management> Compressing and Converting Models> What Can I Do If Converting a Caffe Model Failed?

What Can I Do If Converting a Caffe Model Failed?

Symptom

The submitted Caffe model fails to be converted.

If the conversion fails, you can obtain the corresponding logs on the model conversion task details page. If information similar to the following is displayed, the model conversion failure is caused by unsupported operators.
'Error your model contain ddk not support operators, please refer to [pointing to the faq connection]'

Possible Cause

The HiSilicon DDK supports only some operators. If the custom model contains operators that are not supported, the conversion fails.

Solution

  1. The operator evaluation result file eval_report.json exists in the model output directory of the model conversion task. Obtain the file from the corresponding OBS directory and use the JSON formatting tool to format the evaluation result file.

    After the file is formatted, you can check which operator is not supported in the file and which operator is recommended for replacement. The following is an example:

    {
    	"fail": 1,
    	"name": "SSD_VGG_640x640",
    	"op": [{
    		"name": "conv1_1",
    		"result": "success",
    		"type": "Convolution"
    	}, {
    		"cause": [{
    			"code": 8,
    			"message": "The type is ambiguous. Please choose from the following candidate list [FSRDetectionOutput, SSDDetectionOutput, YoloDetectionOutput]."
    		}],
    		"name": "detection_out",
    		"result": "failed",
    		"type": "DetectionOutput"
    	}],
    	"pass": 86,
    	"result": "failed",
    	"total": 87
    }
  2. If you want to continue to convert models, you need to map operators.

    Add an operator mapping file in the model input directory. The file must be named opmap.txt. Write operator mappings into the file in the format of Unsupported operator:Supported operator used for replacement as follows:

    DetectionOutput:SSDDetectionOutput
  3. On the ModelArts management console, submit the model conversion task again.