False)
for n in tmp_g.node:
print("* %s | %s " % (n.name, n.attr["dtype"]))
tmp_file = tempfile.NamedTemporaryFile("w", delete=False, dir=args.graph_tmp_dir).name
logger.info("write graph to a tmp file: %s" % tmp_file)
with tf.gfile.GFile(tmp_file, "wb") as f:
f.write(tmp_g.SerializeToString())
After Change
False)
for n in tmp_g.node:
if "embeddings" in n.name:
print(n)
tmp_file = tempfile.NamedTemporaryFile("w", delete=False, dir=args.graph_tmp_dir).name
logger.info("write graph to a tmp file: %s" % tmp_file)
with tf.gfile.GFile(tmp_file, "wb") as f:
f.write(tmp_g.SerializeToString())