mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Align TensorFlow and OpenCV paths to create a text graph
This commit is contained in:
parent
eb00dce78e
commit
252fd63194
@ -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…
Reference in New Issue
Block a user