【发布时间】:2017-08-27 21:33:31
【问题描述】:
我正在使用keras搭建基于Resnet50的模型,如下代码所示
input_crop = Input(shape=(3, 224, 224))
# extract feature from image crop
resnet = ResNet50(include_top=False, weights='imagenet')
for layer in resnet.layers: # set resnet as non-trainable
layer.trainable = False
crop_encoded = resnet(input_crop)
但是,我遇到了一个错误
'ValueError: 输入通道数不匹配对应 过滤器尺寸,224 != 3'
我该如何解决?
【问题讨论】:
-
您使用的是什么后端,您的 keras.json 文件的内容是什么?
标签: machine-learning neural-network keras deep-learning conv-neural-network