Closed mahehu closed 4 years ago
@mahehu, I hope the following workaround will help you.
from keras.models import Model
from keras.layers import Input, Conv2D
newinput = Input(shape=(224,224,3))
conv = Conv2D(3, kernel_size=1)(newinput)
newmodel = Model(inputs=[newinput], outputs=[model(conv)])
@mahehu, I'll close the issue for now. Please feel free to open it again at any time if you have additional comments.
Thanks, this solved the issue. Sorry for not remembering to comment on that.
Thanks for your great work!
Documentation gives this example for initializing the pretrained network with custom
input_tensor
:However, adding another layer at the input fails:
This results in the following error:
With
weights=None
or without theConv2D
layer this works fine.I'm using keras version 2.2.4 and keras-applications version 1.0.8.