batch_complex.py 文件源码

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

项目:dataset 作者: analysiscenter 项目源码 文件源码
def gen_data():
        ix = np.arange(K)
        images = np.random.randint(0, 255, size=K//2*S*S).reshape(-1, S, S).astype('uint8')
        top = np.random.randint(0, 3, size=K*2).reshape(-1, 2).astype('uint8')
        size = np.random.randint(3, 7, size=K*2).reshape(-1, 2).astype('uint8')
        pos = np.random.choice(range(len(images)), replace=True, size=K)
        data = images, top, size, pos

        #dsindex = DatasetIndex(ix)
        ds = Dataset(index=ix, batch_class=MyBatch)
        return ds, data


    # Create datasets
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号