datasets.py 文件源码

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

项目:neuroevolution 作者: cosmoharrigan 项目源码 文件源码
def load_images_torcs_4():
    import glob
    filepath = 'datasets/torcs_4/training_set/*.png'
    filenames = glob.glob(filepath)

    sample = scipy.ndimage.imread(filenames[0])
    num_images = len(filenames)
    images = np.zeros((num_images, sample.shape[0], sample.shape[1]), dtype=np.uint8)

    for i in range(num_images):
        images[i] = scipy.ndimage.imread(filenames[i])

    images = images.reshape(len(images), 1, 64, 64)

    return images
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号