Commit 5fd47352 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #13904 from cftang0827:dnn_tf_text_graph_common_bug

parents dd696066 98d84364
...@@ -324,6 +324,6 @@ def writeTextGraph(modelPath, outputPath, outNodes): ...@@ -324,6 +324,6 @@ def writeTextGraph(modelPath, outputPath, outNodes):
for node in graph_def.node: for node in graph_def.node:
if node.op == 'Const': if node.op == 'Const':
if 'value' in node.attr and node.attr['value'].tensor.tensor_content: if 'value' in node.attr and node.attr['value'].tensor.tensor_content:
node.attr['value'].tensor.tensor_content = '' node.attr['value'].tensor.tensor_content = b''
tf.train.write_graph(graph_def, "", outputPath, as_text=True) tf.train.write_graph(graph_def, "", outputPath, as_text=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment