from keras.applications import VGG16

conv_base = VGG16(weights='imagenet',
                  include_top=False,
                  input_shape=(150, 150, 3))

。下载VGG16网络时出现错误

Exception: URL fetch failure on https://storage.googleapis.com/
tensorflow/keras-applications/vgg16/
vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5:
 None -- [Errno 2] No such file or directory

下载需要一点科学手段。重新运行代码,之后就没问题了。

58889256/58889256 [==============================] - 9s 0us/step

Logo

加入社区!打开量化的大门,首批课程上线啦!

更多推荐