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 running model Market1501 #26

Open
knowfahad opened this issue Aug 10, 2017 · 7 comments
Open

error while running model Market1501 #26

knowfahad opened this issue Aug 10, 2017 · 7 comments

Comments

@knowfahad
Copy link

knowfahad commented Aug 10, 2017

When tried to run model-for-market1501.py after the h5 file was made, this error showed up. Keras and other libs are installed

Using TensorFlow backend.
default dim order is: tf
please input your system user name:fahad
now begin to compile the model with the difference between ones and neighbour matrixs.
model_for_market1501.py:93: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(20, (5, 5), kernel_regularizer=<keras.reg..., data_format="channels_last")
share = Convolution2D(20,5,5,dim_ordering='tf', W_regularizer=l2(l=weight_decay))
model_for_market1501.py:98: UserWarning: Update your MaxPooling2D call to the Keras 2 API: MaxPooling2D(data_format="channels_last")
a4 = MaxPooling2D(dim_ordering='tf')(a3)
model_for_market1501.py:99: UserWarning: Update your MaxPooling2D call to the Keras 2 API: MaxPooling2D(data_format="channels_last")
b4 = MaxPooling2D(dim_ordering='tf')(b3)
model_for_market1501.py:100: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(25, (5, 5), kernel_regularizer=<keras.reg..., data_format="channels_last")
share2 = Convolution2D(25,5,5,dim_ordering='tf', W_regularizer=l2(l=weight_decay))
model_for_market1501.py:105: UserWarning: Update your MaxPooling2D call to the Keras 2 API: MaxPooling2D(data_format="channels_last")
a7 = MaxPooling2D(dim_ordering='tf')(a6)
model_for_market1501.py:106: UserWarning: Update your MaxPooling2D call to the Keras 2 API: MaxPooling2D(data_format="channels_last")
b7 = MaxPooling2D(dim_ordering='tf')(b6)
model_for_market1501.py:107: UserWarning: The merge function is deprecated and will be removed after 08/2017. Use instead layers from keras.layers.merge, e.g. add, concatenate, etc.
a8 = merge([a7,b7],mode=cross_input_asym,output_shape=cross_input_shape)
/usr/local/lib/python2.7/dist-packages/keras/legacy/layers.py:458: UserWarning: The Merge layer is deprecated and will be removed after 08/2017. Use instead layers from keras.layers.merge, e.g. add, concatenate, etc.
name=name)
Traceback (most recent call last):
File "model_for_market1501.py", line 391, in
model = model_def()
File "model_for_market1501.py", line 107, in model_def
a8 = merge([a7,b7],mode=cross_input_asym,output_shape=cross_input_shape)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/layers.py", line 458, in merge
name=name)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/layers.py", line 120, in init
self(input_tensors, mask=input_masks)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 596, in call
output = self.call(inputs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/keras/legacy/layers.py", line 201, in call
return self.mode(inputs, **arguments)
File "model_for_market1501.py", line 69, in cross_input_asym
tensor_left_padding = K.spatial_2d_padding(tensor_left,padding=(2,2))
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 1999, in spatial_2d_padding
assert len(padding[0]) == 2
TypeError: object of type 'int' has no len()

@Ning-Ding
Copy link
Owner

The code for the Market 1501 part still remained old version, sorry for my late update, I just suffered a tough month with too many projects.
I'm planning to add CONTRIBUTING.md and LICENSE to the project to make it open source, so there will be a big update within few days.
Thank you for your issue.

@xiaotuziguaiguai
Copy link

I have the same question,and do not solve it . It is the merge vision question,i think

@M-Ghorbel
Copy link

M-Ghorbel commented Sep 22, 2018

i'm getting the same error too.
did someone find a solution?

@seuzxy
Copy link

seuzxy commented Feb 25, 2019

Hello, have you solved this problem?

@seuzxy
Copy link

seuzxy commented Feb 25, 2019

I have the same question,and do not solve it . It is the merge vision question,i think

Hello, have you solved this problem?

@seuzxy
Copy link

seuzxy commented Feb 25, 2019

i'm getting the same error too.
did someone find a solution?

Hello, have you solved this problem?

@NourAldin7
Copy link

Downgrade Keras to 1.2.2 and the problem will disappear

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

6 participants