def read_bundle_file(bundle_file):
# Read in bundle file.
bundle = generator_pb2.GeneratorBundle()
with tf.gfile.Open(bundle_file, 'rb') as f:
try:
bundle.ParseFromString(f.read())
except message.DecodeError as e:
raise GeneratorBundleParseException(e)
return bundle
评论列表
文章目录