mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Merge pull request #21152 from rogday:fix_defaults
This commit is contained in:
commit
0d2857a242
@ -80,7 +80,7 @@ public:
|
||||
if (size % 2 != 1 || size <= 0)
|
||||
CV_Error(Error::StsBadArg, "LRN layer supports only positive odd values for local_size");
|
||||
|
||||
alpha = params.get<double>("alpha", 1);
|
||||
alpha = params.get<double>("alpha", 0.0001);
|
||||
beta = params.get<double>("beta", 0.75);
|
||||
bias = params.get<double>("bias", 1);
|
||||
normBySize = params.get<bool>("norm_by_size", true);
|
||||
|
@ -920,6 +920,7 @@ void ONNXImporter::parseSplit(LayerParams& layerParams, const opencv_onnx::NodeP
|
||||
layerParams.set("num_split", node_proto.output_size());
|
||||
}
|
||||
layerParams.type = "Slice";
|
||||
layerParams.set("axis", layerParams.get<float>("axis", 0));
|
||||
addLayer(layerParams, node_proto);
|
||||
}
|
||||
|
||||
@ -1184,15 +1185,15 @@ void ONNXImporter::parseImageScaler(LayerParams& layerParams, const opencv_onnx:
|
||||
void ONNXImporter::parseClip(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto)
|
||||
{
|
||||
layerParams.type = "ReLU6";
|
||||
replaceLayerParam(layerParams, "min", "min_value");
|
||||
replaceLayerParam(layerParams, "max", "max_value");
|
||||
layerParams.set("min_value", layerParams.get<float>("min", -FLT_MAX));
|
||||
layerParams.set("max_value", layerParams.get<float>("max", FLT_MAX));
|
||||
addLayer(layerParams, node_proto);
|
||||
}
|
||||
|
||||
void ONNXImporter::parseLeakyRelu(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto)
|
||||
{
|
||||
layerParams.type = "ReLU";
|
||||
replaceLayerParam(layerParams, "alpha", "negative_slope");
|
||||
layerParams.set("negative_slope", layerParams.get<float>("alpha", 0.01));
|
||||
addLayer(layerParams, node_proto);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user