This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
from google.protobuf import text_format | |
# Let's read our pbtxt file into a Graph protobuf | |
f = open("/tmp/storage/graph_protobuf.pbtxt", "r") | |
graph_protobuf = text_format.Parse(f.read(), tf.GraphDef()) | |
# Import the graph protobuf into our new graph. | |
graph_clone = tf.Graph() | |
with graph_clone.as_default(): |