dataset.py 文件源码

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

项目:spikefuel 作者: duguyue100 项目源码 文件源码
def gen_caltech256_db(database, caltech256_stats):
    """Generate Caltech-256 structure.

    Parameters
    ----------
    database : h5py.File
        HDF5 file object
    caltech256_stats : dictionary
        the dictionary that contains Caltech-256's stats

    Returns
    -------
    database : h5py.File
        HDF5 file object with multiple groups
    """
    caltech256_list = caltech256_stats["caltech256_list"]

    for class_name in caltech256_list:
        if class_name not in database:
            database.create_group(class_name)
            print "[MESSAGE] Class %s is created" % (class_name)

    print "[MESSAGE] Caltech-256 HDF5 structure is generated."
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号