addLayer(layerParams, node_proto);
}
- void ONNXImporter::parseReduce(LayerParams &layerParams, const opencv_onnx::NodeProto &node_proto_)
-// "GlobalAveragePool" "GlobalMaxPool" "ReduceMean" "ReduceSum" "ReduceMax"
+ void ONNXImporter::parseReduce(LayerParams& layerParams, const opencv_onnx::NodeProto& node_proto_)
{
opencv_onnx::NodeProto node_proto = node_proto_;
const std::string& layer_type = node_proto.op_type();
Mat blob = getBlob(node_proto, 1);
CV_Assert(blob.type() == CV_32SC1);
-- layerParams.set("dim", DictValue::arrayInt<int*>(
- blob.ptr<int>(), blob.total() ));
- blob.ptr<int>(), blob.total() ));
++ layerParams.set("dim", DictValue::arrayInt<int*>(blob.ptr<int>(), blob.total()));
if (layer_id.find(node_proto.input(0)) == layer_id.end()) {
std::vector<Mat> inputs(1, getBlob(node_proto, 0)), outputs;