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

Adapting different testing image shapes? #40

Open
terrytykuo opened this issue May 3, 2020 · 1 comment
Open

Adapting different testing image shapes? #40

terrytykuo opened this issue May 3, 2020 · 1 comment

Comments

@terrytykuo
Copy link

terrytykuo commented May 3, 2020

I got an error below:

Traceback (most recent call last):
File "main.py", line 63, in
m = Model(input=[x, x_maps], output=sam_resnet([x, x_maps]))
File "/Users/Terry/Documents/Memorix/sam-master/models.py", line 140, in sam_resnet
concateneted = merge([att_convlstm, priors1], mode='concat', concat_axis=1)
File "/Users/Terry/anaconda3/envs/python27/lib/python2.7/site-packages/keras/engine/topology.py", line 1528, in merge
name=name)
File "/Users/Terry/anaconda3/envs/python27/lib/python2.7/site-packages/keras/engine/topology.py", line 1186, in init
node_indices, tensor_indices)
File "/Users/Terry/anaconda3/envs/python27/lib/python2.7/site-packages/keras/engine/topology.py", line 1253, in _arguments_validation
'Layer shapes: %s' % (input_shapes))
Exception: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 512, 113, 180), (None, 16, 30, 40)]

Is it because of my testing images are 1440x900? If so, How do I configure the input shape of the model?

--
Update I tested pics with

@plebreton
Copy link

The issue is you did not set your ~/.keras/keras.json file properly.

You need to have "image_dim_ordering" set to "th".

Note, that there is also another parameter "image_data_format" which comes with more recent version of Keras. You may have changed the wrong one by going quickly into the configuration of the platform ;)

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

2 participants