Closed GeorgeKAHChen closed 5 years ago
Good job. This is due to the version of Keras. The code is best run on Keras 1.2.1.
Good job. This is due to the version of Keras. The code is best run on Keras 1.2.1.
Ok I got it, thanks.
This time I found two new problems:
In cub_demo.py
(Line 65 - 67)
65 prob = Dropout(dropout)(pool)
66 prob = Dense(nb_class)(pool)
67 prob = Activation(activation='softmax',name=name)(prob)
In this part of code, it seems line 65 (Dropout Layer) did nothing. Because prob
in line 66 is inherited from poor
itself rather than prob
above (ling 65). Is this a mistake or this layer is unnecessary in the network? Or I misunderstand the code/network?
Another problem is how to output final feature identity? I found a switch called "flag_test". However, when I turn on this flag, the outputs are classes after classification rather than feature. We want to do more researching and studying using this A3M feature with a new classifier in re-id problems. So how can I get feature directly?
Thank you so much for your help~
to out_list.append(final_fea)
. The final feature in the output list can be used for person re-id.
Thanks for your sharing and paper, which showed us an excellent idea in pedestrian re-identification. However, when I run your sample code with your sample dataset, something wrong in the function
keras.layers.merge()
And the error is
TypeError: 'module' object is not callable
First, I thought my tensorflow or keras environment have some wrong or conda have problems. But after long time research and testing, I found the problem is not caused by environment or system. Then I try to find the introduction of function merge, but I can only find information about this LAYER rather than MERGE FUNCTION identity! ( https://keras.io/layers/merge/ ) Finally, I got the solution here:
https://github.com/keras-team/keras/issues/3921#issuecomment-306031159 .
It seems this layer is not exist anymore. Then I changed code from
merge(.., mode = "", dot_axis=**)
todot (.., axis = **)
(or average, concatenate) and now it works.It seems you need to upgrade your code as soon as possible and solve this little but annoying problem. Thanks~