{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/1018","labels_url":"https://api.github.com/repos/fchollet/keras/issues/1018/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/1018/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/1018/events","html_url":"https://github.com/fchollet/keras/pull/1018","id":117022557,"number":1018,"title":"Fix for join mode.","user":{"login":"dbonadiman","id":1776151,"avatar_url":"https://avatars.githubusercontent.com/u/1776151?v=3","gravatar_id":"","url":"https://api.github.com/users/dbonadiman","html_url":"https://github.com/dbonadiman","followers_url":"https://api.github.com/users/dbonadiman/followers","following_url":"https://api.github.com/users/dbonadiman/following{/other_user}","gists_url":"https://api.github.com/users/dbonadiman/gists{/gist_id}","starred_url":"https://api.github.com/users/dbonadiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbonadiman/subscriptions","organizations_url":"https://api.github.com/users/dbonadiman/orgs","repos_url":"https://api.github.com/users/dbonadiman/repos","events_url":"https://api.github.com/users/dbonadiman/events{/privacy}","received_events_url":"https://api.github.com/users/dbonadiman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-11-15T22:12:33Z","updated_at":"2015-11-17T04:05:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fchollet/keras/pulls/1018","html_url":"https://github.com/fchollet/keras/pull/1018","diff_url":"https://github.com/fchollet/keras/pull/1018.diff","patch_url":"https://github.com/fchollet/keras/pull/1018.patch"},"body":"I need to introduce a bit the problem first.\r\nThe `join` mode for the merge layer is the layer designed to pass the inputs of a graph node to the layer without any transformation. That was the pull request with the relative discussion.\r\n\r\nhttps://github.com/fchollet/keras/pull/690\r\n\r\nThe problem with the previous implementation of the code was that It always produce the exception `raise ValueError(\"merge_mode='join' only works with named inputs\")`\r\nsince there are no named output tensors in keras. \r\n\r\n```python\r\n for i in range(len(self.layers)):\r\n     X = self.layers[i].get_output(train)\r\n    if X.name is None:\r\n       raise ValueError(\"merge_mode='join' only works with named inputs\")\r\n    else:\r\n       inputs[X.name] = X\r\n return inputs\r\n```\r\n\r\n\r\n\r\nThe first and simple solution that came to my mind was obviously to name any output tensors in the code. But i think that for the moment is dispendious and useless.\r\n\r\nSo i decided to add a parameter `name` to the layer itself that is set with the set_name function.\r\n\r\nTell me what you ( @fchollet  ) and @EderSantana (the original creator of the join mode) think and in particular if any further modification is needed."},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/157262521","html_url":"https://github.com/fchollet/keras/pull/1018#issuecomment-157262521","issue_url":"https://api.github.com/repos/fchollet/keras/issues/1018","id":157262521,"user":{"login":"EderSantana","id":3902480,"avatar_url":"https://avatars.githubusercontent.com/u/3902480?v=3","gravatar_id":"","url":"https://api.github.com/users/EderSantana","html_url":"https://github.com/EderSantana","followers_url":"https://api.github.com/users/EderSantana/followers","following_url":"https://api.github.com/users/EderSantana/following{/other_user}","gists_url":"https://api.github.com/users/EderSantana/gists{/gist_id}","starred_url":"https://api.github.com/users/EderSantana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EderSantana/subscriptions","organizations_url":"https://api.github.com/users/EderSantana/orgs","repos_url":"https://api.github.com/users/EderSantana/repos","events_url":"https://api.github.com/users/EderSantana/events{/privacy}","received_events_url":"https://api.github.com/users/EderSantana/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T04:05:19Z","updated_at":"2015-11-17T04:05:19Z","body":"@fchollet I believe @dbonadiman had a neat and simple solution for naming conventions that is independent of the way we do it in Theano. It makes `merge_mode=join` just work even for Sequential, which is a problem @farizrahman4u and I had before. Please, give it a read to see if conforms with the plans for the new backends and naming conventions you had in mind. I'm doing the coding review, I just needed your opinion to avoid giving suggestions that won't get ultimately accepted.\r\n\r\n@dbonadiman let us just wait for François real quick so you don't work without being assured this is good for Keras."}}