def load_images(image_names):
imgs = []
for img_name in image_names:
img = imread(img_name)
img = (imresize(img, (227, 227))[:, :, :3]).astype(float32)
img = img - mean(img)
imgs.append(img)
return imgs
文章目录