{"action":"created","comment":{"url":"https://api.github.com/repos/fchollet/keras/pulls/comments/45152266","id":45152266,"diff_hunk":"@@ -31,6 +31,7 @@ def __init__(self, **kwargs):\n             self._trainable = kwargs['trainable']\n         if not hasattr(self, 'params'):\n             self.params = []\n+        self.name = None","path":"keras/layers/core.py","position":4,"original_position":4,"commit_id":"7279356fd92882ced7d56fac16949c4e486d8ac6","original_commit_id":"7279356fd92882ced7d56fac16949c4e486d8ac6","user":{"login":"fchollet","id":710255,"avatar_url":"https://avatars.githubusercontent.com/u/710255?v=3","gravatar_id":"","url":"https://api.github.com/users/fchollet","html_url":"https://github.com/fchollet","followers_url":"https://api.github.com/users/fchollet/followers","following_url":"https://api.github.com/users/fchollet/following{/other_user}","gists_url":"https://api.github.com/users/fchollet/gists{/gist_id}","starred_url":"https://api.github.com/users/fchollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchollet/subscriptions","organizations_url":"https://api.github.com/users/fchollet/orgs","repos_url":"https://api.github.com/users/fchollet/repos","events_url":"https://api.github.com/users/fchollet/events{/privacy}","received_events_url":"https://api.github.com/users/fchollet/received_events","type":"User","site_admin":false},"body":"Then, why not allow a `name` keyword argument that would set `self.name`?","created_at":"2015-11-18T02:20:25Z","updated_at":"2015-11-18T02:20:25Z","html_url":"https://github.com/fchollet/keras/pull/1018#discussion_r45152266","pull_request_url":"https://api.github.com/repos/fchollet/keras/pulls/1018","_links":{"self":{"href":"https://api.github.com/repos/fchollet/keras/pulls/comments/45152266"},"html":{"href":"https://github.com/fchollet/keras/pull/1018#discussion_r45152266"},"pull_request":{"href":"https://api.github.com/repos/fchollet/keras/pulls/1018"}}},"pull_request":{"url":"https://api.github.com/repos/fchollet/keras/pulls/1018","id":50758094,"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","issue_url":"https://api.github.com/repos/fchollet/keras/issues/1018","number":1018,"state":"open","locked":false,"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},"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.","created_at":"2015-11-15T22:12:33Z","updated_at":"2015-11-18T02:20:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57fc659e20b3a5a3b3cb9f48b28c74ee7a4d580c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fchollet/keras/pulls/1018/commits","review_comments_url":"https://api.github.com/repos/fchollet/keras/pulls/1018/comments","review_comment_url":"https://api.github.com/repos/fchollet/keras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/1018/comments","statuses_url":"https://api.github.com/repos/fchollet/keras/statuses/7279356fd92882ced7d56fac16949c4e486d8ac6","head":{"label":"dbonadiman:patch-6","ref":"patch-6","sha":"7279356fd92882ced7d56fac16949c4e486d8ac6","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},"repo":{"id":45800575,"name":"keras","full_name":"dbonadiman/keras","owner":{"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},"private":false,"html_url":"https://github.com/dbonadiman/keras","description":"Theano-based Deep Learning library (convnets, recurrent neural networks, and more).","fork":true,"url":"https://api.github.com/repos/dbonadiman/keras","forks_url":"https://api.github.com/repos/dbonadiman/keras/forks","keys_url":"https://api.github.com/repos/dbonadiman/keras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dbonadiman/keras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dbonadiman/keras/teams","hooks_url":"https://api.github.com/repos/dbonadiman/keras/hooks","issue_events_url":"https://api.github.com/repos/dbonadiman/keras/issues/events{/number}","events_url":"https://api.github.com/repos/dbonadiman/keras/events","assignees_url":"https://api.github.com/repos/dbonadiman/keras/assignees{/user}","branches_url":"https://api.github.com/repos/dbonadiman/keras/branches{/branch}","tags_url":"https://api.github.com/repos/dbonadiman/keras/tags","blobs_url":"https://api.github.com/repos/dbonadiman/keras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dbonadiman/keras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dbonadiman/keras/git/refs{/sha}","trees_url":"https://api.github.com/repos/dbonadiman/keras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dbonadiman/keras/statuses/{sha}","languages_url":"https://api.github.com/repos/dbonadiman/keras/languages","stargazers_url":"https://api.github.com/repos/dbonadiman/keras/stargazers","contributors_url":"https://api.github.com/repos/dbonadiman/keras/contributors","subscribers_url":"https://api.github.com/repos/dbonadiman/keras/subscribers","subscription_url":"https://api.github.com/repos/dbonadiman/keras/subscription","commits_url":"https://api.github.com/repos/dbonadiman/keras/commits{/sha}","git_commits_url":"https://api.github.com/repos/dbonadiman/keras/git/commits{/sha}","comments_url":"https://api.github.com/repos/dbonadiman/keras/comments{/number}","issue_comment_url":"https://api.github.com/repos/dbonadiman/keras/issues/comments{/number}","contents_url":"https://api.github.com/repos/dbonadiman/keras/contents/{+path}","compare_url":"https://api.github.com/repos/dbonadiman/keras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dbonadiman/keras/merges","archive_url":"https://api.github.com/repos/dbonadiman/keras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dbonadiman/keras/downloads","issues_url":"https://api.github.com/repos/dbonadiman/keras/issues{/number}","pulls_url":"https://api.github.com/repos/dbonadiman/keras/pulls{/number}","milestones_url":"https://api.github.com/repos/dbonadiman/keras/milestones{/number}","notifications_url":"https://api.github.com/repos/dbonadiman/keras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dbonadiman/keras/labels{/name}","releases_url":"https://api.github.com/repos/dbonadiman/keras/releases{/id}","created_at":"2015-11-08T21:45:52Z","updated_at":"2015-11-08T21:45:53Z","pushed_at":"2015-11-15T22:43:19Z","git_url":"git://github.com/dbonadiman/keras.git","ssh_url":"git@github.com:dbonadiman/keras.git","clone_url":"https://github.com/dbonadiman/keras.git","svn_url":"https://github.com/dbonadiman/keras","homepage":"http://keras.io/","size":1241,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fchollet:master","ref":"master","sha":"653ee91d35a215e231c4d1b0042983d9e3addcf0","user":{"login":"fchollet","id":710255,"avatar_url":"https://avatars.githubusercontent.com/u/710255?v=3","gravatar_id":"","url":"https://api.github.com/users/fchollet","html_url":"https://github.com/fchollet","followers_url":"https://api.github.com/users/fchollet/followers","following_url":"https://api.github.com/users/fchollet/following{/other_user}","gists_url":"https://api.github.com/users/fchollet/gists{/gist_id}","starred_url":"https://api.github.com/users/fchollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchollet/subscriptions","organizations_url":"https://api.github.com/users/fchollet/orgs","repos_url":"https://api.github.com/users/fchollet/repos","events_url":"https://api.github.com/users/fchollet/events{/privacy}","received_events_url":"https://api.github.com/users/fchollet/received_events","type":"User","site_admin":false},"repo":{"id":33015583,"name":"keras","full_name":"fchollet/keras","owner":{"login":"fchollet","id":710255,"avatar_url":"https://avatars.githubusercontent.com/u/710255?v=3","gravatar_id":"","url":"https://api.github.com/users/fchollet","html_url":"https://github.com/fchollet","followers_url":"https://api.github.com/users/fchollet/followers","following_url":"https://api.github.com/users/fchollet/following{/other_user}","gists_url":"https://api.github.com/users/fchollet/gists{/gist_id}","starred_url":"https://api.github.com/users/fchollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchollet/subscriptions","organizations_url":"https://api.github.com/users/fchollet/orgs","repos_url":"https://api.github.com/users/fchollet/repos","events_url":"https://api.github.com/users/fchollet/events{/privacy}","received_events_url":"https://api.github.com/users/fchollet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fchollet/keras","description":"Theano-based Deep Learning library (convnets, recurrent neural networks, and more).","fork":false,"url":"https://api.github.com/repos/fchollet/keras","forks_url":"https://api.github.com/repos/fchollet/keras/forks","keys_url":"https://api.github.com/repos/fchollet/keras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fchollet/keras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fchollet/keras/teams","hooks_url":"https://api.github.com/repos/fchollet/keras/hooks","issue_events_url":"https://api.github.com/repos/fchollet/keras/issues/events{/number}","events_url":"https://api.github.com/repos/fchollet/keras/events","assignees_url":"https://api.github.com/repos/fchollet/keras/assignees{/user}","branches_url":"https://api.github.com/repos/fchollet/keras/branches{/branch}","tags_url":"https://api.github.com/repos/fchollet/keras/tags","blobs_url":"https://api.github.com/repos/fchollet/keras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fchollet/keras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fchollet/keras/git/refs{/sha}","trees_url":"https://api.github.com/repos/fchollet/keras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fchollet/keras/statuses/{sha}","languages_url":"https://api.github.com/repos/fchollet/keras/languages","stargazers_url":"https://api.github.com/repos/fchollet/keras/stargazers","contributors_url":"https://api.github.com/repos/fchollet/keras/contributors","subscribers_url":"https://api.github.com/repos/fchollet/keras/subscribers","subscription_url":"https://api.github.com/repos/fchollet/keras/subscription","commits_url":"https://api.github.com/repos/fchollet/keras/commits{/sha}","git_commits_url":"https://api.github.com/repos/fchollet/keras/git/commits{/sha}","comments_url":"https://api.github.com/repos/fchollet/keras/comments{/number}","issue_comment_url":"https://api.github.com/repos/fchollet/keras/issues/comments{/number}","contents_url":"https://api.github.com/repos/fchollet/keras/contents/{+path}","compare_url":"https://api.github.com/repos/fchollet/keras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fchollet/keras/merges","archive_url":"https://api.github.com/repos/fchollet/keras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fchollet/keras/downloads","issues_url":"https://api.github.com/repos/fchollet/keras/issues{/number}","pulls_url":"https://api.github.com/repos/fchollet/keras/pulls{/number}","milestones_url":"https://api.github.com/repos/fchollet/keras/milestones{/number}","notifications_url":"https://api.github.com/repos/fchollet/keras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fchollet/keras/labels{/name}","releases_url":"https://api.github.com/repos/fchollet/keras/releases{/id}","created_at":"2015-03-28T00:35:42Z","updated_at":"2015-11-17T18:13:24Z","pushed_at":"2015-11-18T02:03:07Z","git_url":"git://github.com/fchollet/keras.git","ssh_url":"git@github.com:fchollet/keras.git","clone_url":"https://github.com/fchollet/keras.git","svn_url":"https://github.com/fchollet/keras","homepage":"http://keras.io/","size":4543,"stargazers_count":3236,"watchers_count":3236,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":709,"mirror_url":null,"open_issues_count":213,"forks":709,"open_issues":213,"watchers":3236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fchollet/keras/pulls/1018"},"html":{"href":"https://github.com/fchollet/keras/pull/1018"},"issue":{"href":"https://api.github.com/repos/fchollet/keras/issues/1018"},"comments":{"href":"https://api.github.com/repos/fchollet/keras/issues/1018/comments"},"review_comments":{"href":"https://api.github.com/repos/fchollet/keras/pulls/1018/comments"},"review_comment":{"href":"https://api.github.com/repos/fchollet/keras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fchollet/keras/pulls/1018/commits"},"statuses":{"href":"https://api.github.com/repos/fchollet/keras/statuses/7279356fd92882ced7d56fac16949c4e486d8ac6"}}}}