diff --git a/samples/dnn/tf_text_graph_common.py b/samples/dnn/tf_text_graph_common.py index 5a8e62495d..b46b1d492c 100644 --- a/samples/dnn/tf_text_graph_common.py +++ b/samples/dnn/tf_text_graph_common.py @@ -324,6 +324,6 @@ def writeTextGraph(modelPath, outputPath, outNodes): for node in graph_def.node: if node.op == 'Const': 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)