processing.py 文件源码

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

项目:deep-lossy-fun 作者: PetarV- 项目源码 文件源码
def load_and_process(img_path, target_size=None):
    # Feed in the image, convert to array
    img = load_img(img_path, target_size=target_size)
    img = img_to_array(img)

    # Add the batch dimension
    img = np.expand_dims(img, axis=0)

    # Perform the usual ImageNet preprocessing
    img = preprocess_input(img)

    return img
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号