How Can I Resolve a Proto Merging Error?
1. The user message definition conflicts with the AMCT custom layer.
The content of custom.proto is as follows. The defined QuantParameter layer information is the same as that defined in 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;
}
The following error information is displayed when proto merging is executed:

Solution 1
Modify the user-defined message as prompted.
Scenario 2: The custom layer index number defined in LayerParameter conflicts with that of AMCT.
The content of custom.proto is as follows. The defined LayerParameter ID is the same as that in 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];
}
The following error information is displayed when proto merging is executed:

Solution No.2
Change the custom operator ID in custom.proto as prompted.
Scenario 3: The custom layer index number defined in LayerParameter conflicts with that of ATC.
The user-defined custom.proto content is as follows. The defined LayerParameter ID is the same as that in caffe.proto in ATC.
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];
}
The following error information is displayed when proto merging is executed:

Solution 3:
Change the custom operator ID in custom.proto as prompted.
Scenario 4: The user message definition conflicts with the ATC custom layer.
The content of custom.proto is as follows. The NormalizeParameter layer information defined in custom.proto is the same as that defined in 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];
}
No error message is displayed when the proto merging command is run. By default, the custom.proto file is used and the ATC built-in message definition is overwritten. The following messages are displayed.

4 solutions organizations
None