深度学习Keras(七):dogs vs cats数据集(卷积神经网络的可视化)(一)
import numpy as npimport matplotlib.pyplot as pltfrom keras import modelsfrom keras.preprocessing import image#单张图片路径img_path = '/home/wildchap/cats_and_dogs_small/test/cats/cat.1978.jpg'#将图像预处理为一个4D张量img = image.load_img(img_path, target_size=(15