执行proto合并时提示ERROR信息
场景1:用户message定义和昇腾模型压缩工具自定义层冲突
用户自定义custom.proto内容如下,其中定义的QuantParameter层信息与amct_custom.proto中定义的重复:
message LayerParameter { optional QuantParameter quant_param = 208; optional ReLU6Parameter relu6_param = 1000000; optional ROIPoolingParameter roi_pooling_param = 8266711; } message ReLU6Parameter { optional float negative_slope = 1 [default = 0]; } message ROIPoolingParameter { // Pad, kernel size, and stride are all given as a single value for equal // dimensions in height and width or as Y, X pairs. optional uint32 pooled_h = 1 [default = 0]; // The pooled output height optional uint32 pooled_w = 2 [default = 0]; // The pooled output width // Multiplicative spatial scale factor to translate ROI coords from their // input scale to the scale used when pooling optional float spatial_scale = 3 [default = 1]; } message QuantParameter { optional bool with_offset = 1; optional float scale = 2; optional bytes offset = 3; optional string object_layer = 4; }
执行proto合并时报错信息如下:
解决方案1
根据提示信息,用户自行修改自定义的message信息。
场景2:用户自定义在LayerParameter中编号和昇腾模型压缩工具编号冲突
用户自定义custom.proto内容如下,其中定义的LayerParameter编号与amct_custom.proto中编号重复:
message LayerParameter { optional QuantParameter quant_param = 208; optional ReLU6Parameter relu6_param = 1000000; optional ROIPoolingParameter roi_pooling_param = 8266711; } message ReLU6Parameter { optional float negative_slope = 1 [default = 0]; } message ROIPoolingParameter { // Pad, kernel size, and stride are all given as a single value for equal // dimensions in height and width or as Y, X pairs. optional uint32 pooled_h = 1 [default = 0]; // The pooled output height optional uint32 pooled_w = 2 [default = 0]; // The pooled output width // Multiplicative spatial scale factor to translate ROI coords from their // input scale to the scale used when pooling optional float spatial_scale = 3 [default = 1]; }
执行proto合并时报错信息如下:
解决方案2
用户根据提示信息修改custom.proto中自定义的算子编号。
场景3:用户自定义在LayerParameter中编号和ATC编号冲突
用户自定义custom.proto内容如下,其中定义的LayerParameter编号与ATC中的caffe.proto中编号重复:
message LayerParameter { optional ReLU6Parameter relu6_param = 206; optional ROIPoolingParameter roi_pooling_param = 8266711; } message ReLU6Parameter { optional float negative_slope = 1 [default = 0]; } message ROIPoolingParameter { // Pad, kernel size, and stride are all given as a single value for equal // dimensions in height and width or as Y, X pairs. optional uint32 pooled_h = 1 [default = 0]; // The pooled output height optional uint32 pooled_w = 2 [default = 0]; // The pooled output width // Multiplicative spatial scale factor to translate ROI coords from their // input scale to the scale used when pooling optional float spatial_scale = 3 [default = 1]; }
执行proto合并时报错信息如下:
解决方案3
用户根据提示信息修改custom.proto中自定义的算子编号。
场景4:用户message定义和ATC自定义层冲突
用户自定义custom.proto内容如下,其中定义的NormalizeParameter层信息与caffe.proto中定义的重复:
message LayerParameter { optional ReLU6Parameter relu6_param = 1000000; optional ROIPoolingParameter roi_pooling_param = 8266711; optional NormalizeParameter norm_param = 206; } message ReLU6Parameter { optional float negative_slope = 1 [default = 0]; } message ROIPoolingParameter { // Pad, kernel size, and stride are all given as a single value for equal // dimensions in height and width or as Y, X pairs. optional uint32 pooled_h = 1 [default = 0]; // The pooled output height optional uint32 pooled_w = 2 [default = 0]; // The pooled output width // Multiplicative spatial scale factor to translate ROI coords from their // input scale to the scale used when pooling optional float spatial_scale = 3 [default = 1]; } message NormalizeParameter { optional bool across_spatial = 1 [default = true]; // Initial value of scale. Default is 1.0 for all optional FillerParameter scale_filler = 2; // Whether or not scale parameters are shared across channels. optional bool channel_shared = 3 [default = true]; // Epsilon for not dividing by zero while normalizing variance optional float eps = 4 [default = 1e-10]; }
执行proto合并时无错误提示信息,默认会覆盖ATC内置message定义,以custom.proto为准,提示信息如下:
解决方案4
无。
父主题: FAQ