Keras Maxpooling2d layer gives ValueError

后端 未结 7 1693
难免孤独
难免孤独 2021-02-07 00:10

I am trying to replicate VGG16 model in keras, the following is my code:

model = Sequential()
model.add(ZeroPadding2D((1,1),input_shape=(3,224,224)))
model.add(C         


        
7条回答
  •  [愿得一人]
    2021-02-07 00:39

    I faced the same issue, I solved it by changing my padding: 'valid' to padding:'SAME': I guess its enough to add a parameter padding:' same'

    model.add(MaxPooling2D((2,2), strides=(2,2), padding='same'))
    

提交回复
热议问题