parameters: (filename, proto_class)
docstring: Load protos from a text file where each line is one proto.
docstring_summary: Load protos from a text file where each line is one proto.
docstring_tokens: Load protos from a text file where each line is one proto .
function: def load_text_protos(filename, proto_class):
    """Load protos from a text file where each line is one proto."""
    cnt = 0
    with tf.gfile.Open(filename) as f:
      for line in f:
        if line.rstrip():
          proto = proto_class()
          text_format.Parse(line, proto)
          cnt += 1
          yield proto
    tf.logging.info('Read %d protos from %s of type %s', cnt, filename,
                    proto_class.DESCRIPTOR.full_name)
function_tokens: def load_text_protos ( filename , proto_class ) : cnt = 0 with tf . gfile . Open ( filename ) as f : for line in f : if line . rstrip ( ) : proto = proto_class ( ) text_format . Parse ( line , proto ) cnt += 1 yield proto tf . logging . info ( 'Read %d protos from %s of type %s' , cnt , filename , proto_class . DESCRIPTOR . full_name )