diff options
Diffstat (limited to 'tensorflow/compiler/aot/tests/make_test_graphs.py')
-rw-r--r-- | tensorflow/compiler/aot/tests/make_test_graphs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/compiler/aot/tests/make_test_graphs.py b/tensorflow/compiler/aot/tests/make_test_graphs.py index 6981cb6757..98c13958d3 100644 --- a/tensorflow/compiler/aot/tests/make_test_graphs.py +++ b/tensorflow/compiler/aot/tests/make_test_graphs.py @@ -72,7 +72,7 @@ def tfadd_with_ckpt_saver(out_dir): saver.save(sess, ckpt_file) # Without the SaverDef, the restore op won't be named correctly. saver_file = '%s/test_graph_tfadd_with_ckpt_saver.saver' % out_dir - with open(saver_file, 'w') as f: + with open(saver_file, 'wb') as f: f.write(saver.as_saver_def().SerializeToString()) @@ -113,7 +113,7 @@ def write_graph(build_graph, out_dir): with g.as_default(): build_graph(out_dir) filename = '%s/test_graph_%s.pb' % (out_dir, build_graph.__name__) - with open(filename, 'w') as f: + with open(filename, 'wb') as f: f.write(g.as_graph_def().SerializeToString()) |