add support for tf.add_n operation
authorzuoshaobo <zuoshaobo@science.com>
Tue, 2 Apr 2019 07:20:53 +0000 (03:20 -0400)
committerzuoshaobo <zuoshaobo@science.com>
Tue, 2 Apr 2019 07:20:53 +0000 (03:20 -0400)
modules/dnn/src/tensorflow/tf_importer.cpp

index 480e8c7..9cca9e9 100644 (file)
@@ -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)