{"action":"created","comment":{"url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/comments/242531055","pull_request_review_id":186060756,"id":242531055,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjUzMTA1NQ==","diff_hunk":"@@ -11,43 +11,31 @@ class GGNNReadout(chainer.Chain):\n         out_dim (int): dimension of output feature vector\n         hidden_dim (int): dimension of feature vector associated to\n             each atom\n-        n_layers (int): number of layers\n-        concat_hidden (bool): If set to True, readout is executed in\n-            each layer and the result is concatenated\n         nobias (bool): If ``True``, then this function does not use\n             the bias\n         activation (~chainer.Function or ~chainer.FunctionNode):\n             activate function\n             It can be replaced with the functions.identity.\n     \"\"\"\n \n-    def __init__(self, out_dim, hidden_dim=16, n_layers=4,\n-                 concat_hidden=False, nobias=False,\n+    def __init__(self, out_dim, hidden_dim=16, nobias=False,\n                  activation=functions.tanh):\n         super(GGNNReadout, self).__init__()\n-        n_layer = n_layers if concat_hidden else 1\n         with self.init_scope():\n-            self.i_layers = chainer.ChainList(\n-                *[GraphLinear(None, out_dim, nobias=nobias)\n-                  for _ in range(n_layer)])\n-            self.j_layers = chainer.ChainList(\n-                *[GraphLinear(None, out_dim, nobias=nobias)\n-                  for _ in range(n_layer)])\n+            self.i_layer = GraphLinear(None, out_dim, nobias=nobias)\n+            self.j_layer = GraphLinear(None, out_dim, nobias=nobias)\n         self.out_dim = out_dim\n         self.hidden_dim = hidden_dim\n-        self.n_layers = n_layers\n-        self.concat_hidden = concat_hidden\n         self.nobias = nobias\n         self.activation = activation\n \n-    def __call__(self, h, h0=None, step=0):\n+    def __call__(self, h, h0=None):\n         # --- Readout part ---\n-        index = step if self.concat_hidden else 0\n         # h, h0: (minibatch, atom, ch)\n         h1 = functions.concat((h, h0), axis=2) if h0 is not None else h\n \n-        g1 = functions.sigmoid(self.i_layers[index](h1))\n-        g2 = self.activation(self.j_layers[index](h1))\n+        g1 = functions.sigmoid(self.i_layer(h1))\n+        g2 = self.activation(self.j_layer(h1))\n         # sum along atom's axis\n         g = self.activation(functions.sum(g1 * g2, axis=1))","path":"chainer_chemistry/links/readout/ggnn_readout.py","position":48,"original_position":48,"commit_id":"45bd06a5cd2b9a31ae895f4beca9fc11208adf73","original_commit_id":"45bd06a5cd2b9a31ae895f4beca9fc11208adf73","user":{"login":"natsukium","id":25083790,"node_id":"MDQ6VXNlcjI1MDgzNzkw","avatar_url":"https://avatars0.githubusercontent.com/u/25083790?v=4","gravatar_id":"","url":"https://api.github.com/users/natsukium","html_url":"https://github.com/natsukium","followers_url":"https://api.github.com/users/natsukium/followers","following_url":"https://api.github.com/users/natsukium/following{/other_user}","gists_url":"https://api.github.com/users/natsukium/gists{/gist_id}","starred_url":"https://api.github.com/users/natsukium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natsukium/subscriptions","organizations_url":"https://api.github.com/users/natsukium/orgs","repos_url":"https://api.github.com/users/natsukium/repos","events_url":"https://api.github.com/users/natsukium/events{/privacy}","received_events_url":"https://api.github.com/users/natsukium/received_events","type":"User","site_admin":false},"body":"According to the paper, https://arxiv.org/abs/1511.05493, tanh functions are applied in eq.7.\r\nIt also says that \"The tanh functions can also be replaced with the identity\".\r\nI think you are able to select which functions to use.","created_at":"2018-12-18T13:14:43Z","updated_at":"2018-12-18T13:14:43Z","html_url":"https://github.com/pfnet-research/chainer-chemistry/pull/292#discussion_r242531055","pull_request_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/292","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/comments/242531055"},"html":{"href":"https://github.com/pfnet-research/chainer-chemistry/pull/292#discussion_r242531055"},"pull_request":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/292"}},"in_reply_to_id":242503966},"pull_request":{"url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/292","id":239099484,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MDk5NDg0","html_url":"https://github.com/pfnet-research/chainer-chemistry/pull/292","diff_url":"https://github.com/pfnet-research/chainer-chemistry/pull/292.diff","patch_url":"https://github.com/pfnet-research/chainer-chemistry/pull/292.patch","issue_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/issues/292","number":292,"state":"open","locked":false,"title":"Fix ggnn","user":{"login":"natsukium","id":25083790,"node_id":"MDQ6VXNlcjI1MDgzNzkw","avatar_url":"https://avatars0.githubusercontent.com/u/25083790?v=4","gravatar_id":"","url":"https://api.github.com/users/natsukium","html_url":"https://github.com/natsukium","followers_url":"https://api.github.com/users/natsukium/followers","following_url":"https://api.github.com/users/natsukium/following{/other_user}","gists_url":"https://api.github.com/users/natsukium/gists{/gist_id}","starred_url":"https://api.github.com/users/natsukium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natsukium/subscriptions","organizations_url":"https://api.github.com/users/natsukium/orgs","repos_url":"https://api.github.com/users/natsukium/repos","events_url":"https://api.github.com/users/natsukium/events{/privacy}","received_events_url":"https://api.github.com/users/natsukium/received_events","type":"User","site_admin":false},"body":"I have refactored GGNN model which is able to handle args; step, concat_hidden and weight_tying.\r\nDue to this, GGNNUpdate and GGNNReadout modules have no state of network.","created_at":"2018-12-17T10:46:54Z","updated_at":"2018-12-18T13:14:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c63c8ff15441c113a7376b9408623507b995138","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/292/commits","review_comments_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/292/comments","review_comment_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/issues/292/comments","statuses_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/statuses/45bd06a5cd2b9a31ae895f4beca9fc11208adf73","head":{"label":"natsukium:fix-ggnn","ref":"fix-ggnn","sha":"45bd06a5cd2b9a31ae895f4beca9fc11208adf73","user":{"login":"natsukium","id":25083790,"node_id":"MDQ6VXNlcjI1MDgzNzkw","avatar_url":"https://avatars0.githubusercontent.com/u/25083790?v=4","gravatar_id":"","url":"https://api.github.com/users/natsukium","html_url":"https://github.com/natsukium","followers_url":"https://api.github.com/users/natsukium/followers","following_url":"https://api.github.com/users/natsukium/following{/other_user}","gists_url":"https://api.github.com/users/natsukium/gists{/gist_id}","starred_url":"https://api.github.com/users/natsukium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natsukium/subscriptions","organizations_url":"https://api.github.com/users/natsukium/orgs","repos_url":"https://api.github.com/users/natsukium/repos","events_url":"https://api.github.com/users/natsukium/events{/privacy}","received_events_url":"https://api.github.com/users/natsukium/received_events","type":"User","site_admin":false},"repo":{"id":135832897,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU4MzI4OTc=","name":"chainer-chemistry","full_name":"natsukium/chainer-chemistry","private":false,"owner":{"login":"natsukium","id":25083790,"node_id":"MDQ6VXNlcjI1MDgzNzkw","avatar_url":"https://avatars0.githubusercontent.com/u/25083790?v=4","gravatar_id":"","url":"https://api.github.com/users/natsukium","html_url":"https://github.com/natsukium","followers_url":"https://api.github.com/users/natsukium/followers","following_url":"https://api.github.com/users/natsukium/following{/other_user}","gists_url":"https://api.github.com/users/natsukium/gists{/gist_id}","starred_url":"https://api.github.com/users/natsukium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natsukium/subscriptions","organizations_url":"https://api.github.com/users/natsukium/orgs","repos_url":"https://api.github.com/users/natsukium/repos","events_url":"https://api.github.com/users/natsukium/events{/privacy}","received_events_url":"https://api.github.com/users/natsukium/received_events","type":"User","site_admin":false},"html_url":"https://github.com/natsukium/chainer-chemistry","description":"Chainer Chemistry: A Library for Deep Learning in Biology and Chemistry","fork":true,"url":"https://api.github.com/repos/natsukium/chainer-chemistry","forks_url":"https://api.github.com/repos/natsukium/chainer-chemistry/forks","keys_url":"https://api.github.com/repos/natsukium/chainer-chemistry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/natsukium/chainer-chemistry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/natsukium/chainer-chemistry/teams","hooks_url":"https://api.github.com/repos/natsukium/chainer-chemistry/hooks","issue_events_url":"https://api.github.com/repos/natsukium/chainer-chemistry/issues/events{/number}","events_url":"https://api.github.com/repos/natsukium/chainer-chemistry/events","assignees_url":"https://api.github.com/repos/natsukium/chainer-chemistry/assignees{/user}","branches_url":"https://api.github.com/repos/natsukium/chainer-chemistry/branches{/branch}","tags_url":"https://api.github.com/repos/natsukium/chainer-chemistry/tags","blobs_url":"https://api.github.com/repos/natsukium/chainer-chemistry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/natsukium/chainer-chemistry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/natsukium/chainer-chemistry/git/refs{/sha}","trees_url":"https://api.github.com/repos/natsukium/chainer-chemistry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/natsukium/chainer-chemistry/statuses/{sha}","languages_url":"https://api.github.com/repos/natsukium/chainer-chemistry/languages","stargazers_url":"https://api.github.com/repos/natsukium/chainer-chemistry/stargazers","contributors_url":"https://api.github.com/repos/natsukium/chainer-chemistry/contributors","subscribers_url":"https://api.github.com/repos/natsukium/chainer-chemistry/subscribers","subscription_url":"https://api.github.com/repos/natsukium/chainer-chemistry/subscription","commits_url":"https://api.github.com/repos/natsukium/chainer-chemistry/commits{/sha}","git_commits_url":"https://api.github.com/repos/natsukium/chainer-chemistry/git/commits{/sha}","comments_url":"https://api.github.com/repos/natsukium/chainer-chemistry/comments{/number}","issue_comment_url":"https://api.github.com/repos/natsukium/chainer-chemistry/issues/comments{/number}","contents_url":"https://api.github.com/repos/natsukium/chainer-chemistry/contents/{+path}","compare_url":"https://api.github.com/repos/natsukium/chainer-chemistry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/natsukium/chainer-chemistry/merges","archive_url":"https://api.github.com/repos/natsukium/chainer-chemistry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/natsukium/chainer-chemistry/downloads","issues_url":"https://api.github.com/repos/natsukium/chainer-chemistry/issues{/number}","pulls_url":"https://api.github.com/repos/natsukium/chainer-chemistry/pulls{/number}","milestones_url":"https://api.github.com/repos/natsukium/chainer-chemistry/milestones{/number}","notifications_url":"https://api.github.com/repos/natsukium/chainer-chemistry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/natsukium/chainer-chemistry/labels{/name}","releases_url":"https://api.github.com/repos/natsukium/chainer-chemistry/releases{/id}","deployments_url":"https://api.github.com/repos/natsukium/chainer-chemistry/deployments","created_at":"2018-06-02T16:14:00Z","updated_at":"2018-12-17T08:36:10Z","pushed_at":"2018-12-17T11:12:17Z","git_url":"git://github.com/natsukium/chainer-chemistry.git","ssh_url":"git@github.com:natsukium/chainer-chemistry.git","clone_url":"https://github.com/natsukium/chainer-chemistry.git","svn_url":"https://github.com/natsukium/chainer-chemistry","homepage":"","size":1288,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pfnet-research:master","ref":"master","sha":"0f113fb27175792a67856e7d7d8a463104e8c1af","user":{"login":"pfnet-research","id":23070723,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDcwNzIz","avatar_url":"https://avatars2.githubusercontent.com/u/23070723?v=4","gravatar_id":"","url":"https://api.github.com/users/pfnet-research","html_url":"https://github.com/pfnet-research","followers_url":"https://api.github.com/users/pfnet-research/followers","following_url":"https://api.github.com/users/pfnet-research/following{/other_user}","gists_url":"https://api.github.com/users/pfnet-research/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet-research/subscriptions","organizations_url":"https://api.github.com/users/pfnet-research/orgs","repos_url":"https://api.github.com/users/pfnet-research/repos","events_url":"https://api.github.com/users/pfnet-research/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet-research/received_events","type":"Organization","site_admin":false},"repo":{"id":112321712,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIzMjE3MTI=","name":"chainer-chemistry","full_name":"pfnet-research/chainer-chemistry","private":false,"owner":{"login":"pfnet-research","id":23070723,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMDcwNzIz","avatar_url":"https://avatars2.githubusercontent.com/u/23070723?v=4","gravatar_id":"","url":"https://api.github.com/users/pfnet-research","html_url":"https://github.com/pfnet-research","followers_url":"https://api.github.com/users/pfnet-research/followers","following_url":"https://api.github.com/users/pfnet-research/following{/other_user}","gists_url":"https://api.github.com/users/pfnet-research/gists{/gist_id}","starred_url":"https://api.github.com/users/pfnet-research/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfnet-research/subscriptions","organizations_url":"https://api.github.com/users/pfnet-research/orgs","repos_url":"https://api.github.com/users/pfnet-research/repos","events_url":"https://api.github.com/users/pfnet-research/events{/privacy}","received_events_url":"https://api.github.com/users/pfnet-research/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pfnet-research/chainer-chemistry","description":"Chainer Chemistry: A Library for Deep Learning in Biology and Chemistry","fork":false,"url":"https://api.github.com/repos/pfnet-research/chainer-chemistry","forks_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/forks","keys_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/teams","hooks_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/hooks","issue_events_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/issues/events{/number}","events_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/events","assignees_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/assignees{/user}","branches_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/branches{/branch}","tags_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/tags","blobs_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/git/refs{/sha}","trees_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/statuses/{sha}","languages_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/languages","stargazers_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/stargazers","contributors_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/contributors","subscribers_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/subscribers","subscription_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/subscription","commits_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/commits{/sha}","git_commits_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/git/commits{/sha}","comments_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/comments{/number}","issue_comment_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/issues/comments{/number}","contents_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/contents/{+path}","compare_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/merges","archive_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/downloads","issues_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/issues{/number}","pulls_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls{/number}","milestones_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/milestones{/number}","notifications_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/labels{/name}","releases_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/releases{/id}","deployments_url":"https://api.github.com/repos/pfnet-research/chainer-chemistry/deployments","created_at":"2017-11-28T10:35:09Z","updated_at":"2018-12-17T10:20:53Z","pushed_at":"2018-12-18T08:59:29Z","git_url":"git://github.com/pfnet-research/chainer-chemistry.git","ssh_url":"git@github.com:pfnet-research/chainer-chemistry.git","clone_url":"https://github.com/pfnet-research/chainer-chemistry.git","svn_url":"https://github.com/pfnet-research/chainer-chemistry","homepage":"","size":1284,"stargazers_count":241,"watchers_count":241,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":54,"open_issues":20,"watchers":241,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/292"},"html":{"href":"https://github.com/pfnet-research/chainer-chemistry/pull/292"},"issue":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/issues/292"},"comments":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/issues/292/comments"},"review_comments":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/292/comments"},"review_comment":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/pulls/292/commits"},"statuses":{"href":"https://api.github.com/repos/pfnet-research/chainer-chemistry/statuses/45bd06a5cd2b9a31ae895f4beca9fc11208adf73"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"natsukium"}}