Merge pull request #15391 from dkurt:fix_15141

This commit is contained in:
Alexander Alekhin 2019-08-26 12:17:21 +00:00
commit 4a33014edc
2 changed files with 3 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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)