fusion-classify.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:toothless 作者: ratt-ru 项目源码 文件源码
def read_labels(labels_file):
    """
    Returns a list of strings

    Arguments:
    labels_file -- path to a .txt file
    """
    if not labels_file:
        print 'WARNING: No labels file provided. Results will be difficult to interpret.'
        return None

    labels = []
    with open(labels_file) as infile:
        for line in infile:
            label = line.strip()
            if label:
                labels.append(label)
    assert len(labels), 'No labels found'
    return labels


# Decide class based on threshold
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号