Import wrapped Dropout subgraphs from TensorFlow

pull/9673/head
Dmitry Kurtaev 7 years ago
parent 6a5298a532
commit bdd8cc697a
  1. 2
      modules/dnn/src/tensorflow/tf_importer.cpp
  2. 5
      modules/dnn/test/test_tf_importer.cpp

@ -363,7 +363,7 @@ void RemoveIdentityOps(tensorflow::GraphDef& net) {
const tensorflow::NodeDef &layer = net.node(li); const tensorflow::NodeDef &layer = net.node(li);
String type = layer.op(); String type = layer.op();
if (type == "Identity") { if (type == "Identity" || type == "Dropout") {
identity_ops_idx.push_back(li); identity_ops_idx.push_back(li);
identity_ops[layer.name()] = layer.input(0); identity_ops[layer.name()] = layer.input(0);
} }

@ -138,6 +138,11 @@ TEST(Test_TensorFlow, matmul)
runTensorFlowNet("matmul"); runTensorFlowNet("matmul");
} }
TEST(Test_TensorFlow, defun)
{
runTensorFlowNet("defun_dropout");
}
TEST(Test_TensorFlow, fp16) TEST(Test_TensorFlow, fp16)
{ {
const float l1 = 1e-3; const float l1 = 1e-3;

Loading…
Cancel
Save