{"action":"created","issue":{"url":"https://api.github.com/repos/jutanke/person_reid/issues/2","repository_url":"https://api.github.com/repos/jutanke/person_reid","labels_url":"https://api.github.com/repos/jutanke/person_reid/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jutanke/person_reid/issues/2/comments","events_url":"https://api.github.com/repos/jutanke/person_reid/issues/2/events","html_url":"https://github.com/jutanke/person_reid/issues/2","id":368214059,"node_id":"MDU6SXNzdWUzNjgyMTQwNTk=","number":2,"title":"weight problem","user":{"login":"mgq1507","id":32251588,"node_id":"MDQ6VXNlcjMyMjUxNTg4","avatar_url":"https://avatars2.githubusercontent.com/u/32251588?v=4","gravatar_id":"","url":"https://api.github.com/users/mgq1507","html_url":"https://github.com/mgq1507","followers_url":"https://api.github.com/users/mgq1507/followers","following_url":"https://api.github.com/users/mgq1507/following{/other_user}","gists_url":"https://api.github.com/users/mgq1507/gists{/gist_id}","starred_url":"https://api.github.com/users/mgq1507/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgq1507/subscriptions","organizations_url":"https://api.github.com/users/mgq1507/orgs","repos_url":"https://api.github.com/users/mgq1507/repos","events_url":"https://api.github.com/users/mgq1507/events{/privacy}","received_events_url":"https://api.github.com/users/mgq1507/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-09T13:36:11Z","updated_at":"2018-10-22T13:14:16Z","closed_at":null,"author_association":"NONE","body":"When load_model(), I have counted this problem?@jutanke Can you help me? Thank you!\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-1-f25b52ed3962> in <module>()\r\n     11 X, Y = m1501.get_train()\r\n     12 \r\n---> 13 model = reid.ReId()\r\n     14 \r\n     15 im1 = X[0]\r\n\r\n~/gen/Re-ID/person_reid-master/reid/reid.py in __init__(self, root, url, name)\r\n     28             dl.download(url, filepath)\r\n     29 \r\n---> 30         self.model = load_model(filepath)\r\n     31 \r\n     32     def predict(self, A, B):\r\n\r\n~/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py in load_model(filepath, custom_objects, compile)\r\n    417     f = h5dict(filepath, 'r')\r\n    418     try:\r\n--> 419         model = _deserialize_model(f, custom_objects, compile)\r\n    420     finally:\r\n    421         if opened_new_file:\r\n\r\n~/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py in _deserialize_model(f, custom_objects, compile)\r\n    272                                                        original_keras_version,\r\n    273                                                        original_backend,\r\n--> 274                                                        reshape=False)\r\n    275         if len(weight_values) != len(symbolic_weights):\r\n    276             raise ValueError('Layer #' + str(k) +\r\n\r\n~/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape)\r\n    680         weights = convert_nested_time_distributed(weights)\r\n    681     elif layer.__class__.__name__ in ['Model', 'Sequential']:\r\n--> 682         weights = convert_nested_model(weights)\r\n    683 \r\n    684     if original_keras_version == '1':\r\n\r\n~/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py in convert_nested_model(weights)\r\n    668                     weights=weights[:num_weights],\r\n    669                     original_keras_version=original_keras_version,\r\n--> 670                     original_backend=original_backend))\r\n    671                 weights = weights[num_weights:]\r\n    672         return new_weights\r\n\r\n~/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape)\r\n    680         weights = convert_nested_time_distributed(weights)\r\n    681     elif layer.__class__.__name__ in ['Model', 'Sequential']:\r\n--> 682         weights = convert_nested_model(weights)\r\n    683 \r\n    684     if original_keras_version == '1':\r\n\r\n~/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py in convert_nested_model(weights)\r\n    656                     weights=weights[:num_weights],\r\n    657                     original_keras_version=original_keras_version,\r\n--> 658                     original_backend=original_backend))\r\n    659                 weights = weights[num_weights:]\r\n    660 \r\n\r\n~/anaconda3/lib/python3.6/site-packages/keras/engine/saving.py in preprocess_weights_for_loading(layer, weights, original_keras_version, original_backend, reshape)\r\n    799             weights[0] = np.reshape(weights[0], layer_weights_shape)\r\n    800         elif layer_weights_shape != weights[0].shape:\r\n--> 801             weights[0] = np.transpose(weights[0], (3, 2, 0, 1))\r\n    802             if layer.__class__.__name__ == 'ConvLSTM2D':\r\n    803                 weights[1] = np.transpose(weights[1], (3, 2, 0, 1))\r\n\r\n~/anaconda3/lib/python3.6/site-packages/numpy/core/fromnumeric.py in transpose(a, axes)\r\n    548 \r\n    549     \"\"\"\r\n--> 550     return _wrapfunc(a, 'transpose', axes)\r\n    551 \r\n    552 \r\n\r\n~/anaconda3/lib/python3.6/site-packages/numpy/core/fromnumeric.py in _wrapfunc(obj, method, *args, **kwds)\r\n     55 def _wrapfunc(obj, method, *args, **kwds):\r\n     56     try:\r\n---> 57         return getattr(obj, method)(*args, **kwds)\r\n     58 \r\n     59     # An AttributeError occurs if the object does not have\r\n\r\nValueError: axes don't match array"},"comment":{"url":"https://api.github.com/repos/jutanke/person_reid/issues/comments/431832021","html_url":"https://github.com/jutanke/person_reid/issues/2#issuecomment-431832021","issue_url":"https://api.github.com/repos/jutanke/person_reid/issues/2","id":431832021,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTgzMjAyMQ==","user":{"login":"jutanke","id":831215,"node_id":"MDQ6VXNlcjgzMTIxNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/831215?v=4","gravatar_id":"","url":"https://api.github.com/users/jutanke","html_url":"https://github.com/jutanke","followers_url":"https://api.github.com/users/jutanke/followers","following_url":"https://api.github.com/users/jutanke/following{/other_user}","gists_url":"https://api.github.com/users/jutanke/gists{/gist_id}","starred_url":"https://api.github.com/users/jutanke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jutanke/subscriptions","organizations_url":"https://api.github.com/users/jutanke/orgs","repos_url":"https://api.github.com/users/jutanke/repos","events_url":"https://api.github.com/users/jutanke/events{/privacy}","received_events_url":"https://api.github.com/users/jutanke/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T13:14:16Z","updated_at":"2018-10-22T13:14:16Z","author_association":"OWNER","body":"You can try the current new version. It should work with Keras 2.1.x but there seems to be a bug in Keras 2.2.x that prevents models from checkpoints to be loaded."}}
{"actor":{"display_login":"jutanke"}}