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

Error while concatenating mbox_conf_softmax, mbox_loc, mbox_priorbox #4

Open
amapic opened this issue Nov 14, 2019 · 5 comments
Open

Comments

@amapic
Copy link

amapic commented Nov 14, 2019

Hi,

Sorry to bother you, I am stuck on this :

ValueError: A Concatenate layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, 2268, 21), (None, 2268, 4), (None, 4000, 8)]

The mbox_priorbox tensor has a different shape. Do you know why ?

Thanks, have a good day

@apichat583
Copy link

it's ok.
I change K.image_dim_ordering() == 'tf' to K.image_data_format=="channels_first' and it works. It'a problem of conversion between python 2 and 3.

@diefish2
Copy link

I am having the same problems
ValueError: A Concatenate layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, 1208, 100), (None, 1208, 4), (None, 2928, 8)]
and I tried change tf to channels_first it's still not working.
Anyone could help

Thank you

@amapic
Copy link
Author

amapic commented Nov 30, 2019 via email

@zhangw864680355
Copy link

I am having the same problems
ValueError: A Concatenate layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, 1208, 100), (None, 1208, 4), (None, 2928, 8)]
and I tried change tf to channels_first it's still not working.
Anyone could help

Thank you

In fact, you need to modify in file (“misc/keras_layer_AnchorBoxes.py”) as follow:
change K.image_dim_ordering() == 'tf' to K.image_data_format=="channels_last' instead of "channels_first".
You can have a try.

@amapic
Copy link
Author

amapic commented Dec 10, 2019

You need to do that in every file where image_dim_ordering appears, there is more than one

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