{"action":"created","issue":{"url":"https://api.github.com/repos/keras-team/keras/issues/1349","repository_url":"https://api.github.com/repos/keras-team/keras","labels_url":"https://api.github.com/repos/keras-team/keras/issues/1349/labels{/name}","comments_url":"https://api.github.com/repos/keras-team/keras/issues/1349/comments","events_url":"https://api.github.com/repos/keras-team/keras/issues/1349/events","html_url":"https://github.com/keras-team/keras/issues/1349","id":123842096,"number":1349,"title":"Siamese and multiple Merge - problem with save/load weights","user":{"login":"jgc128","id":669142,"avatar_url":"https://avatars3.githubusercontent.com/u/669142?v=4","gravatar_id":"","url":"https://api.github.com/users/jgc128","html_url":"https://github.com/jgc128","followers_url":"https://api.github.com/users/jgc128/followers","following_url":"https://api.github.com/users/jgc128/following{/other_user}","gists_url":"https://api.github.com/users/jgc128/gists{/gist_id}","starred_url":"https://api.github.com/users/jgc128/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgc128/subscriptions","organizations_url":"https://api.github.com/users/jgc128/orgs","repos_url":"https://api.github.com/users/jgc128/repos","events_url":"https://api.github.com/users/jgc128/events{/privacy}","received_events_url":"https://api.github.com/users/jgc128/received_events","type":"User","site_admin":false},"labels":[{"id":611595073,"url":"https://api.github.com/repos/keras-team/keras/labels/stale","name":"stale","color":"ffffff","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2015-12-25T00:53:00Z","updated_at":"2018-03-09T00:42:31Z","closed_at":"2017-06-23T21:12:36Z","author_association":"NONE","body":"Hi!\n\nThe following script is failing to load weights with an error `AssertionError: Provided weight array does not match layer weights (2 layer params vs. 0 provided weights)` \nI am using the lastest version of Keras from GitHub\n\n```\nfrom keras.models import Sequential\nfrom keras.layers.core import Layer, Dense, Merge, add_shared_layer\n\nmodel_weights_filename = 'test_weights.hdf5'\n\ninput1 = Sequential()\ninput1.add(Layer(input_shape=(10,)))\n\ninput2 = Sequential()\ninput2.add(Layer(input_shape=(10,)))\n\nadd_shared_layer(Dense(5), [input1, input2])\n\nmerge_sum = Sequential()\nmerge_sum.add(Merge([input1, input2], mode='sum'))\n\nmerge_mul = Sequential()\nmerge_mul.add(Merge([input1, input2], mode='mul'))\n\n\ndense = Sequential()\ndense.add(Merge([merge_mul, merge_sum], mode='concat'))\n\ndense.save_weights(model_weights_filename, overwrite=True)\ndense.load_weights(model_weights_filename)\n```\n\nMerging without `merge_mul` and `merge_sum`  only with the last merge works fine. \n\nI think it has something to do with the parameters that the merge layers is getting from the shared layer - maybe it gets it twice...\n"},"comment":{"url":"https://api.github.com/repos/keras-team/keras/issues/comments/371674839","html_url":"https://github.com/keras-team/keras/issues/1349#issuecomment-371674839","issue_url":"https://api.github.com/repos/keras-team/keras/issues/1349","id":371674839,"user":{"login":"saroufimc1","id":21209502,"avatar_url":"https://avatars2.githubusercontent.com/u/21209502?v=4","gravatar_id":"","url":"https://api.github.com/users/saroufimc1","html_url":"https://github.com/saroufimc1","followers_url":"https://api.github.com/users/saroufimc1/followers","following_url":"https://api.github.com/users/saroufimc1/following{/other_user}","gists_url":"https://api.github.com/users/saroufimc1/gists{/gist_id}","starred_url":"https://api.github.com/users/saroufimc1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saroufimc1/subscriptions","organizations_url":"https://api.github.com/users/saroufimc1/orgs","repos_url":"https://api.github.com/users/saroufimc1/repos","events_url":"https://api.github.com/users/saroufimc1/events{/privacy}","received_events_url":"https://api.github.com/users/saroufimc1/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T00:42:31Z","updated_at":"2018-03-09T00:42:31Z","author_association":"NONE","body":"@farizrahman4u @fchollet \r\nAny update? I am still having an issue when loading a saved Keras model, even when using functional API... "}}
{"actor":{"display_login":"saroufimc1"}}