{"action":"created","comment":{"url":"https://api.github.com/repos/fchollet/keras/pulls/comments/84536292","pull_request_review_id":5311578,"id":84536292,"diff_hunk":"@@ -258,7 +259,16 @@ def collect_trainable_weights(layer):\n         weights += layer.trainable_weights\n     # dedupe weights\n     weights = list(set(weights))\n-    weights.sort(key=lambda x: x.name)\n+    # TF variables have auto-generated the name, while Theano has auto-generated the auto_name variable. name in Theano is None\n+    if weights:\n+        if K._BACKEND == 'tensorflow':\n+            weights.sort(key=lambda x: x.name)\n+        elif K._BACKEND == 'theano':\n+            # auto_name looks e.g. like this 'auto_11', so we have to parse the int and sort by that","path":"keras/engine/training.py","position":18,"original_position":18,"commit_id":"6f4469d68177dc9c6f55faa511315f56b22ce4c8","original_commit_id":"6f4469d68177dc9c6f55faa511315f56b22ce4c8","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":"Actually we don't; what matters is that the weights are in a deterministic order. In *what* order they are is not very important. We could simply sort by `auto_name`.","created_at":"2016-10-21T20:10:14Z","updated_at":"2016-10-21T20:10:38Z","html_url":"https://github.com/fchollet/keras/pull/4121#discussion_r84536292","pull_request_url":"https://api.github.com/repos/fchollet/keras/pulls/4121","_links":{"self":{"href":"https://api.github.com/repos/fchollet/keras/pulls/comments/84536292"},"html":{"href":"https://github.com/fchollet/keras/pull/4121#discussion_r84536292"},"pull_request":{"href":"https://api.github.com/repos/fchollet/keras/pulls/4121"}}},"pull_request":{"url":"https://api.github.com/repos/fchollet/keras/pulls/4121","id":90096988,"html_url":"https://github.com/fchollet/keras/pull/4121","diff_url":"https://github.com/fchollet/keras/pull/4121.diff","patch_url":"https://github.com/fchollet/keras/pull/4121.patch","issue_url":"https://api.github.com/repos/fchollet/keras/issues/4121","number":4121,"state":"open","locked":false,"title":"Fixes for Python 3","user":{"login":"fsonntag","id":1186111,"avatar_url":"https://avatars.githubusercontent.com/u/1186111?v=3","gravatar_id":"","url":"https://api.github.com/users/fsonntag","html_url":"https://github.com/fsonntag","followers_url":"https://api.github.com/users/fsonntag/followers","following_url":"https://api.github.com/users/fsonntag/following{/other_user}","gists_url":"https://api.github.com/users/fsonntag/gists{/gist_id}","starred_url":"https://api.github.com/users/fsonntag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsonntag/subscriptions","organizations_url":"https://api.github.com/users/fsonntag/orgs","repos_url":"https://api.github.com/users/fsonntag/repos","events_url":"https://api.github.com/users/fsonntag/events{/privacy}","received_events_url":"https://api.github.com/users/fsonntag/received_events","type":"User","site_admin":false},"body":"Two small fixes for Python 3. I ran into those issues by playing around with the seq2seq library.\r\n\r\nThe problems can be easily reproduced by running [the test script](https://github.com/farizrahman4u/seq2seq/blob/master/tests/test.py) of seq2seq. Those error can also arise from other usages.\r\n\r\n\r\nI hope it's okay to directly open a pull request without reporting an issue first. ","created_at":"2016-10-19T21:46:38Z","updated_at":"2016-10-21T20:10:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41cc603c39f12a80a54e8e498b9640e64f60dcb6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fchollet/keras/pulls/4121/commits","review_comments_url":"https://api.github.com/repos/fchollet/keras/pulls/4121/comments","review_comment_url":"https://api.github.com/repos/fchollet/keras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/4121/comments","statuses_url":"https://api.github.com/repos/fchollet/keras/statuses/6f4469d68177dc9c6f55faa511315f56b22ce4c8","head":{"label":"fsonntag:master","ref":"master","sha":"6f4469d68177dc9c6f55faa511315f56b22ce4c8","user":{"login":"fsonntag","id":1186111,"avatar_url":"https://avatars.githubusercontent.com/u/1186111?v=3","gravatar_id":"","url":"https://api.github.com/users/fsonntag","html_url":"https://github.com/fsonntag","followers_url":"https://api.github.com/users/fsonntag/followers","following_url":"https://api.github.com/users/fsonntag/following{/other_user}","gists_url":"https://api.github.com/users/fsonntag/gists{/gist_id}","starred_url":"https://api.github.com/users/fsonntag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsonntag/subscriptions","organizations_url":"https://api.github.com/users/fsonntag/orgs","repos_url":"https://api.github.com/users/fsonntag/repos","events_url":"https://api.github.com/users/fsonntag/events{/privacy}","received_events_url":"https://api.github.com/users/fsonntag/received_events","type":"User","site_admin":false},"repo":{"id":71401007,"name":"keras","full_name":"fsonntag/keras","owner":{"login":"fsonntag","id":1186111,"avatar_url":"https://avatars.githubusercontent.com/u/1186111?v=3","gravatar_id":"","url":"https://api.github.com/users/fsonntag","html_url":"https://github.com/fsonntag","followers_url":"https://api.github.com/users/fsonntag/followers","following_url":"https://api.github.com/users/fsonntag/following{/other_user}","gists_url":"https://api.github.com/users/fsonntag/gists{/gist_id}","starred_url":"https://api.github.com/users/fsonntag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsonntag/subscriptions","organizations_url":"https://api.github.com/users/fsonntag/orgs","repos_url":"https://api.github.com/users/fsonntag/repos","events_url":"https://api.github.com/users/fsonntag/events{/privacy}","received_events_url":"https://api.github.com/users/fsonntag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fsonntag/keras","description":"Deep Learning library for Python. Convnets, recurrent neural networks, and more. Runs on Theano or TensorFlow.","fork":true,"url":"https://api.github.com/repos/fsonntag/keras","forks_url":"https://api.github.com/repos/fsonntag/keras/forks","keys_url":"https://api.github.com/repos/fsonntag/keras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsonntag/keras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsonntag/keras/teams","hooks_url":"https://api.github.com/repos/fsonntag/keras/hooks","issue_events_url":"https://api.github.com/repos/fsonntag/keras/issues/events{/number}","events_url":"https://api.github.com/repos/fsonntag/keras/events","assignees_url":"https://api.github.com/repos/fsonntag/keras/assignees{/user}","branches_url":"https://api.github.com/repos/fsonntag/keras/branches{/branch}","tags_url":"https://api.github.com/repos/fsonntag/keras/tags","blobs_url":"https://api.github.com/repos/fsonntag/keras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsonntag/keras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsonntag/keras/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsonntag/keras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsonntag/keras/statuses/{sha}","languages_url":"https://api.github.com/repos/fsonntag/keras/languages","stargazers_url":"https://api.github.com/repos/fsonntag/keras/stargazers","contributors_url":"https://api.github.com/repos/fsonntag/keras/contributors","subscribers_url":"https://api.github.com/repos/fsonntag/keras/subscribers","subscription_url":"https://api.github.com/repos/fsonntag/keras/subscription","commits_url":"https://api.github.com/repos/fsonntag/keras/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsonntag/keras/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsonntag/keras/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsonntag/keras/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsonntag/keras/contents/{+path}","compare_url":"https://api.github.com/repos/fsonntag/keras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsonntag/keras/merges","archive_url":"https://api.github.com/repos/fsonntag/keras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsonntag/keras/downloads","issues_url":"https://api.github.com/repos/fsonntag/keras/issues{/number}","pulls_url":"https://api.github.com/repos/fsonntag/keras/pulls{/number}","milestones_url":"https://api.github.com/repos/fsonntag/keras/milestones{/number}","notifications_url":"https://api.github.com/repos/fsonntag/keras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsonntag/keras/labels{/name}","releases_url":"https://api.github.com/repos/fsonntag/keras/releases{/id}","deployments_url":"https://api.github.com/repos/fsonntag/keras/deployments","created_at":"2016-10-19T21:31:48Z","updated_at":"2016-10-19T21:31:50Z","pushed_at":"2016-10-20T20:48:47Z","git_url":"git://github.com/fsonntag/keras.git","ssh_url":"git@github.com:fsonntag/keras.git","clone_url":"https://github.com/fsonntag/keras.git","svn_url":"https://github.com/fsonntag/keras","homepage":"http://keras.io/","size":4261,"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":"6ffa6f39e6222c5417f70eea84ebd92e2d6113f5","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":"Deep Learning library for Python. Convnets, recurrent neural networks, and more. Runs on Theano or TensorFlow.","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}","deployments_url":"https://api.github.com/repos/fchollet/keras/deployments","created_at":"2015-03-28T00:35:42Z","updated_at":"2016-10-21T17:34:55Z","pushed_at":"2016-10-21T14:20:57Z","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":157513,"stargazers_count":9043,"watchers_count":9043,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2811,"mirror_url":null,"open_issues_count":1544,"forks":2811,"open_issues":1544,"watchers":9043,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fchollet/keras/pulls/4121"},"html":{"href":"https://github.com/fchollet/keras/pull/4121"},"issue":{"href":"https://api.github.com/repos/fchollet/keras/issues/4121"},"comments":{"href":"https://api.github.com/repos/fchollet/keras/issues/4121/comments"},"review_comments":{"href":"https://api.github.com/repos/fchollet/keras/pulls/4121/comments"},"review_comment":{"href":"https://api.github.com/repos/fchollet/keras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fchollet/keras/pulls/4121/commits"},"statuses":{"href":"https://api.github.com/repos/fchollet/keras/statuses/6f4469d68177dc9c6f55faa511315f56b22ce4c8"}}}}
{"actor":{"display_login":"fchollet"}}