Ning-Ding / Implementation-CVPR2015-CNN-for-ReID

Implementation for CVPR 2015 Paper: "An Improved Deep Learning Architecture for Person Re-Identification".
MIT License
147 stars 71 forks source link

error while running model Market1501 #26

Open knowfahad opened 7 years ago

knowfahad commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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

M-Ghorbel commented 6 years ago

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

seuzxy commented 5 years ago

Hello, have you solved this problem?

seuzxy commented 5 years ago

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 commented 5 years ago

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

Hello, have you solved this problem?

NourAldin7 commented 2 years ago

Downgrade Keras to 1.2.2 and the problem will disappear