Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception encountered when calling layer "vgg16" (type Functional). #78

Open
Jennyfer5364 opened this issue Dec 28, 2021 · 6 comments
Open

Comments

@Jennyfer5364
Copy link

Exception encountered when calling layer "vgg16" (type Functional).

pop from empty list

Call arguments received:
• inputs=tf.Tensor(shape=(None, 512, 512, 3), dtype=float32)
• training=None
• mask=None

anyone help me to solve this why this happening

@dkncus
Copy link

dkncus commented Jan 11, 2022

I am having the same issue. Is there a known workaround/fix?

@dkncus
Copy link

dkncus commented Jan 11, 2022

Further notes - I am attempting to load the pretrained model provided in the repo. It seems this is an issue in the 'build_vgg' function in 'pconv_model.py'. The specific line being called causing this error is model= Model(inputs=img, outputs=vgg(processed)). I've managed to isolate the source of this error specifically to the call "vgg(processed)".

@Draco18s
Copy link

I am also seeing this issue.

@dkncus
Copy link

dkncus commented May 22, 2022

I was never able to resolve it fully. What are you trying to do with it?

@Draco18s
Copy link

I was hoping to be able to fine-tune the model on specific content. But if I can't, oh well.

@DenisUllmann
Copy link

I got the same problem.
It seams to be a matter of how to define the outputs of the vgg model with recent versions of TF and Keras.
Instead of:
vgg.outputs = [vgg.layers[i].output for i in vgg_layers]
You can try:
vgg = Model(vgg.inputs, [vgg.layers[i].output for i in vgg_layers])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants