def get_class_name_from_filename(file_name):
"""Gets the class name from a file.
Args:
file_name: The file name to get the class name from.
ie. "american_pit_bull_terrier_105.jpg"
Returns:
example: The converted tf.Example.
"""
match = re.match(r'([A-Za-z_]+)(-[0-9]+\.jpg)', file_name, re.I)
return match.groups()[0]
create_fashion_tf_record.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录