add sum of 1 input

pull/21164/head
Smirnov Egor 3 years ago
parent a6277370ca
commit 33e97e994d
  1. 8
      modules/dnn/src/onnx/onnx_importer.cpp

@ -929,6 +929,14 @@ void ONNXImporter::parseBias(LayerParams& layerParams, const opencv_onnx::NodePr
opencv_onnx::NodeProto node_proto = node_proto_;
const std::string& layer_type = node_proto.op_type();
bool isSub = layer_type == "Sub";
if (layer_type == "Sum" && node_proto.input_size() == 1)
{
layerParams.type = "Identity";
addLayer(layerParams, node_proto);
return;
}
CV_Assert((node_proto.input_size() == 2) || (layer_type == "Sum" && node_proto.input_size() > 2));
if (layer_type == "Sum" && node_proto.input_size() > 2)

Loading…
Cancel
Save