Align TensorFlow and OpenCV paths to create a text graph

pull/13735/head
Dmitry Kurtaev 6 years ago
parent eb00dce78e
commit 252fd63194
  1. 4
      samples/dnn/tf_text_graph_common.py

@ -323,7 +323,7 @@ def writeTextGraph(modelPath, outputPath, outNodes):
for node in graph_def.node:
if node.op == 'Const':
if 'value' in node.attr:
del node.attr['value']
if 'value' in node.attr and node.attr['value'].tensor.tensor_content:
node.attr['value'].tensor.tensor_content = ''
tf.train.write_graph(graph_def, "", outputPath, as_text=True)

Loading…
Cancel
Save