Dmitry Kurtaev 5 years ago
parent 114674c3d9
commit 57676cf64d
  1. 4
      modules/dnn/src/tensorflow/tf_graph_simplifier.cpp
  2. 1
      modules/dnn/test/test_tf_importer.cpp

@ -787,7 +787,7 @@ void RemoveIdentityOps(tensorflow::GraphDef& net)
const tensorflow::NodeDef &layer = net.node(li);
String type = layer.op();
if (type == "Identity" || type == "Dropout") {
if (type == "Identity" || type == "Dropout" || type == "PlaceholderWithDefault") {
identity_ops_idx.push_back(li);
identity_ops[layer.name()] = layer.input(0);
}
@ -1031,7 +1031,7 @@ void removePhaseSwitches(tensorflow::GraphDef& net)
}
}
nodesToRemove.push_back(i);
if (node.op() == "Merge")
if (node.op() == "Merge" || node.op() == "Switch")
mergeOpSubgraphNodes.push(i);
}
}

@ -729,6 +729,7 @@ TEST_P(Test_TensorFlow_layers, subpixel)
TEST_P(Test_TensorFlow_layers, keras_mobilenet_head)
{
runTensorFlowNet("keras_mobilenet_head");
runTensorFlowNet("keras_learning_phase");
}
TEST_P(Test_TensorFlow_layers, resize_bilinear)

Loading…
Cancel
Save