From a34c02a0019c8799cf817d160c5f6aed5bfc8a67 Mon Sep 17 00:00:00 2001 From: zuoshaobo Date: Tue, 2 Apr 2019 03:20:53 -0400 Subject: [PATCH] add support for tf.add_n operation --- modules/dnn/src/tensorflow/tf_importer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dnn/src/tensorflow/tf_importer.cpp b/modules/dnn/src/tensorflow/tf_importer.cpp index 480e8c7d29..9cca9e9b64 100644 --- a/modules/dnn/src/tensorflow/tf_importer.cpp +++ b/modules/dnn/src/tensorflow/tf_importer.cpp @@ -942,7 +942,7 @@ void TFImporter::populateNet(Net dstNet) if (getDataLayout(name, data_layouts) == DATA_LAYOUT_UNKNOWN) data_layouts[name] = DATA_LAYOUT_NHWC; } - else if (type == "BiasAdd" || type == "Add" || type == "Sub") + else if (type == "BiasAdd" || type == "Add" || type == "Sub" || type=="AddN") { bool haveConst = false; for(int ii = 0; !haveConst && ii < layer.input_size(); ++ii)