preprocess.py 文件源码

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

项目:cs224n_prj 作者: lps-stanf 项目源码 文件源码
def preprocess_image(filename, target_size):
    img = image.load_img(filename, target_size=target_size)
    x = image.img_to_array(img)
    x = np.expand_dims(x, axis=0)
    x = preprocess_input(x)
    x = np.squeeze(x)
    return x
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号