title: error in readNetFromTensorflow in c++
body: <p>I'm new in deep learning. In first step I create and train a model in python with keras and freezed by this code:</p>
  
  <pre><code>def export_model(MODEL_NAME, input_node_name, output_node_name):
  
      tf.train.write_graph(K.get_session().graph_def, 'out', \
          MODEL_NAME + '_graph.pbtxt')
  
      tf.train.Saver().save(K.get_session(), 'out/' + MODEL_NAME + '.chkp')
  
      freeze_graph.freeze_graph('out/' + MODEL_NAME + '_graph.pbtxt', None, \
          False, 'out/' + MODEL_NAME + '.chkp', output_node_name, \
          "save/restore_all", "save/Const:0", \
          'out/frozen_' + MODEL_NAME + '.pb', True, "")
  
      input_graph_def = tf.GraphDef()
      with tf.gfile.Open('out/frozen_' + MODEL_NAME + '.pb', "rb") as f:
          input_graph_def.ParseFromString(f.read())
  
      output_graph_def = optimize_for_inference_lib.optimize_for_inference(
              input_graph_def, [input_node_name], [output_node_name],
              tf.float32.as_datatype_enum)
  
      with tf.gfile.FastGFile('out/opt_' + MODEL_NAME + '.pb', "wb") as f:
          f.write(output_graph_def.SerializeToString())
  </code></pre>
  
  <p>it's output :</p>
  
  <ul>
  <li>checkpoint</li>
  <li>Model.chkp.data-00000-of-00001</li>
  <li>Model.chkp.index</li>
  <li>Model.chkp.meta</li>
  <li>Model_graph.pbtxt</li>
  <li>frozen_Model.pb</li>
  <li>opt_Model.pb</li>
  </ul>
  
  <p>when I want to read the net in opencv c++ by readNetFromTensorflow :</p>
  
  <pre><code>String weights = "frozen_Model.pb";
  String pbtxt = "Model_graph.pbtxt";
  dnn::Net cvNet = cv::dnn::readNetFromTensorflow(weights, pbtxt);
  </code></pre>
  
  <p>This will make error :</p>
  
  <blockquote>
    <p>OpenCV(4.0.0-pre) Error: Unspecified error (FAILED: ReadProtoFromBinaryFile(param_file, param). Failed to parse GraphDef file: frozen_Model.pb) in cv::dnn::ReadTFNetParamsFromBinaryFileOrDie, file D:\LIBS\OpenCV-4.00\modules\dnn\src\tensorflow\tf_io.cpp, line 44</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>OpenCV(4.0.0-pre) Error: Assertion failed (const_layers.insert(std::make_pair(name, li)).second) in cv::dnn::experimental_dnn_v4::`anonymous-namespace'::addConstNodes, file D:\LIBS\OpenCV-4.00\modules\dnn\src\tensorflow\tf_importer.cpp, line 555</p>
  </blockquote>
  
  <p>How to fix this error?</p>