def convert_pbtxt_to_graphdef(filename):
    """Returns a `tf.GraphDef` proto representing the data in the given pbtxt file.
  Args:
    filename: The name of a file containing a GraphDef pbtxt (text-formatted
      `tf.GraphDef` protocol buffer data).
  Returns:
    A `tf.GraphDef` protocol buffer.
  """
How to convert protobuf graph to binary wire format?