def _GetExFeatureText(self, example, key):
"""Extracts text for a feature from tf.Example.
Args:
example: tf.Example.
key: Key of the feature to be extracted.
Returns:
A feature text extracted.
"""
values = []
for value in example.features.feature[key].bytes_list.value:
values.append(value.decode("utf-8"))
return values
评论列表
文章目录