{"action":"created","comment":{"url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/comments/170421100","pull_request_review_id":99112397,"id":170421100,"diff_hunk":"@@ -83,13 +83,8 @@ def mobilenet_retinanet(num_classes, backbone='mobilenet224_1.0', inputs=None, *\n \n     mobilenet = MobileNet(input_tensor=inputs, alpha=alpha, include_top=False, pooling=None, weights=None)\n \n-    # get last layer from each depthwise convolution blocks 3, 5, 11 and 13\n-    outputs = [mobilenet.get_layer(name='conv_pw_{}_relu'.format(i)).output for i in [3, 5, 11, 13]]\n-\n-    # create the mobilenet backbone\n-    mobilenet = keras.models.Model(inputs=inputs, outputs=outputs, name=mobilenet.name)\n-\n     # create the full model\n-    model = retinanet.retinanet_bbox(inputs=inputs, num_classes=num_classes, backbone=mobilenet, **kwargs)\n+    model = retinanet.retinanet_bbox(inputs=inputs, num_classes=num_classes, backbone=mobilenet,","path":"keras_retinanet/models/mobilenet.py","position":12,"original_position":12,"commit_id":"540bbad3ebe569c578c9eccf605cc9b82b4e9f20","original_commit_id":"540bbad3ebe569c578c9eccf605cc9b82b4e9f20","user":{"login":"hgaiser","id":716138,"avatar_url":"https://avatars1.githubusercontent.com/u/716138?v=4","gravatar_id":"","url":"https://api.github.com/users/hgaiser","html_url":"https://github.com/hgaiser","followers_url":"https://api.github.com/users/hgaiser/followers","following_url":"https://api.github.com/users/hgaiser/following{/other_user}","gists_url":"https://api.github.com/users/hgaiser/gists{/gist_id}","starred_url":"https://api.github.com/users/hgaiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgaiser/subscriptions","organizations_url":"https://api.github.com/users/hgaiser/orgs","repos_url":"https://api.github.com/users/hgaiser/repos","events_url":"https://api.github.com/users/hgaiser/events{/privacy}","received_events_url":"https://api.github.com/users/hgaiser/received_events","type":"User","site_admin":false},"body":"I don't think passing the layers is a bad idea, but maybe it would be nicer if you pass the layer outputs themselves and not the names of the layers?","created_at":"2018-02-24T13:21:00Z","updated_at":"2018-02-24T13:29:09Z","html_url":"https://github.com/fizyr/keras-retinanet/pull/298#discussion_r170421100","pull_request_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/298","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/comments/170421100"},"html":{"href":"https://github.com/fizyr/keras-retinanet/pull/298#discussion_r170421100"},"pull_request":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/298"}}},"pull_request":{"url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/298","id":171025484,"html_url":"https://github.com/fizyr/keras-retinanet/pull/298","diff_url":"https://github.com/fizyr/keras-retinanet/pull/298.diff","patch_url":"https://github.com/fizyr/keras-retinanet/pull/298.patch","issue_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/298","number":298,"state":"open","locked":false,"title":"compute true layer shapes + backbone VGG","user":{"login":"cgratie","id":9308958,"avatar_url":"https://avatars1.githubusercontent.com/u/9308958?v=4","gravatar_id":"","url":"https://api.github.com/users/cgratie","html_url":"https://github.com/cgratie","followers_url":"https://api.github.com/users/cgratie/followers","following_url":"https://api.github.com/users/cgratie/following{/other_user}","gists_url":"https://api.github.com/users/cgratie/gists{/gist_id}","starred_url":"https://api.github.com/users/cgratie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgratie/subscriptions","organizations_url":"https://api.github.com/users/cgratie/orgs","repos_url":"https://api.github.com/users/cgratie/repos","events_url":"https://api.github.com/users/cgratie/events{/privacy}","received_events_url":"https://api.github.com/users/cgratie/received_events","type":"User","site_admin":false},"body":"This PR adds the VGG backbone, together with the following updates:\r\n* `retinanet` from `retinanet.py` gets an additional argument `backbone_layers` which holds the names of the layers to use for generating the FPN; I have also updated the body of this function to use this argument. This makes it easier to add new backbones without being required to create an intermediary model that has those layers as outputs.\r\n* function `anchors_for_shape` from `anchors.py` takes a new optional keyword argument `model`. If provided, the model is used for computing the actual layer shapes based on the input image. `Generator` also takes a `model` argument in order to pass it to `anchors_for_shape`.\r\n\r\nI have also added a test for VGG in `test_train.py`. To see that computing the actual layer shapes is needed, replace default value `image_min_side=600` from `Generator` with `image_min_side=500`. With `\"--true-shapes'` option in `test_vgg`, the test will still pass, without that it will fail.","created_at":"2018-02-23T14:18:44Z","updated_at":"2018-02-24T13:29:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98940eeee6e9718d7c619c8265ca24d45216b51e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/298/commits","review_comments_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/298/comments","review_comment_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/298/comments","statuses_url":"https://api.github.com/repos/fizyr/keras-retinanet/statuses/540bbad3ebe569c578c9eccf605cc9b82b4e9f20","head":{"label":"cgratie:master","ref":"master","sha":"540bbad3ebe569c578c9eccf605cc9b82b4e9f20","user":{"login":"cgratie","id":9308958,"avatar_url":"https://avatars1.githubusercontent.com/u/9308958?v=4","gravatar_id":"","url":"https://api.github.com/users/cgratie","html_url":"https://github.com/cgratie","followers_url":"https://api.github.com/users/cgratie/followers","following_url":"https://api.github.com/users/cgratie/following{/other_user}","gists_url":"https://api.github.com/users/cgratie/gists{/gist_id}","starred_url":"https://api.github.com/users/cgratie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgratie/subscriptions","organizations_url":"https://api.github.com/users/cgratie/orgs","repos_url":"https://api.github.com/users/cgratie/repos","events_url":"https://api.github.com/users/cgratie/events{/privacy}","received_events_url":"https://api.github.com/users/cgratie/received_events","type":"User","site_admin":false},"repo":{"id":122507189,"name":"keras-retinanet","full_name":"cgratie/keras-retinanet","owner":{"login":"cgratie","id":9308958,"avatar_url":"https://avatars1.githubusercontent.com/u/9308958?v=4","gravatar_id":"","url":"https://api.github.com/users/cgratie","html_url":"https://github.com/cgratie","followers_url":"https://api.github.com/users/cgratie/followers","following_url":"https://api.github.com/users/cgratie/following{/other_user}","gists_url":"https://api.github.com/users/cgratie/gists{/gist_id}","starred_url":"https://api.github.com/users/cgratie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgratie/subscriptions","organizations_url":"https://api.github.com/users/cgratie/orgs","repos_url":"https://api.github.com/users/cgratie/repos","events_url":"https://api.github.com/users/cgratie/events{/privacy}","received_events_url":"https://api.github.com/users/cgratie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cgratie/keras-retinanet","description":"Keras implementation of RetinaNet object detection.","fork":true,"url":"https://api.github.com/repos/cgratie/keras-retinanet","forks_url":"https://api.github.com/repos/cgratie/keras-retinanet/forks","keys_url":"https://api.github.com/repos/cgratie/keras-retinanet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cgratie/keras-retinanet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cgratie/keras-retinanet/teams","hooks_url":"https://api.github.com/repos/cgratie/keras-retinanet/hooks","issue_events_url":"https://api.github.com/repos/cgratie/keras-retinanet/issues/events{/number}","events_url":"https://api.github.com/repos/cgratie/keras-retinanet/events","assignees_url":"https://api.github.com/repos/cgratie/keras-retinanet/assignees{/user}","branches_url":"https://api.github.com/repos/cgratie/keras-retinanet/branches{/branch}","tags_url":"https://api.github.com/repos/cgratie/keras-retinanet/tags","blobs_url":"https://api.github.com/repos/cgratie/keras-retinanet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cgratie/keras-retinanet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cgratie/keras-retinanet/git/refs{/sha}","trees_url":"https://api.github.com/repos/cgratie/keras-retinanet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cgratie/keras-retinanet/statuses/{sha}","languages_url":"https://api.github.com/repos/cgratie/keras-retinanet/languages","stargazers_url":"https://api.github.com/repos/cgratie/keras-retinanet/stargazers","contributors_url":"https://api.github.com/repos/cgratie/keras-retinanet/contributors","subscribers_url":"https://api.github.com/repos/cgratie/keras-retinanet/subscribers","subscription_url":"https://api.github.com/repos/cgratie/keras-retinanet/subscription","commits_url":"https://api.github.com/repos/cgratie/keras-retinanet/commits{/sha}","git_commits_url":"https://api.github.com/repos/cgratie/keras-retinanet/git/commits{/sha}","comments_url":"https://api.github.com/repos/cgratie/keras-retinanet/comments{/number}","issue_comment_url":"https://api.github.com/repos/cgratie/keras-retinanet/issues/comments{/number}","contents_url":"https://api.github.com/repos/cgratie/keras-retinanet/contents/{+path}","compare_url":"https://api.github.com/repos/cgratie/keras-retinanet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cgratie/keras-retinanet/merges","archive_url":"https://api.github.com/repos/cgratie/keras-retinanet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cgratie/keras-retinanet/downloads","issues_url":"https://api.github.com/repos/cgratie/keras-retinanet/issues{/number}","pulls_url":"https://api.github.com/repos/cgratie/keras-retinanet/pulls{/number}","milestones_url":"https://api.github.com/repos/cgratie/keras-retinanet/milestones{/number}","notifications_url":"https://api.github.com/repos/cgratie/keras-retinanet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cgratie/keras-retinanet/labels{/name}","releases_url":"https://api.github.com/repos/cgratie/keras-retinanet/releases{/id}","deployments_url":"https://api.github.com/repos/cgratie/keras-retinanet/deployments","created_at":"2018-02-22T16:50:47Z","updated_at":"2018-02-22T16:50:50Z","pushed_at":"2018-02-23T14:34:44Z","git_url":"git://github.com/cgratie/keras-retinanet.git","ssh_url":"git@github.com:cgratie/keras-retinanet.git","clone_url":"https://github.com/cgratie/keras-retinanet.git","svn_url":"https://github.com/cgratie/keras-retinanet","homepage":null,"size":7471,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fizyr:master","ref":"master","sha":"1f523cf4f1c7d03b020d7141f52a69d5bb314992","user":{"login":"fizyr","id":14974733,"avatar_url":"https://avatars0.githubusercontent.com/u/14974733?v=4","gravatar_id":"","url":"https://api.github.com/users/fizyr","html_url":"https://github.com/fizyr","followers_url":"https://api.github.com/users/fizyr/followers","following_url":"https://api.github.com/users/fizyr/following{/other_user}","gists_url":"https://api.github.com/users/fizyr/gists{/gist_id}","starred_url":"https://api.github.com/users/fizyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fizyr/subscriptions","organizations_url":"https://api.github.com/users/fizyr/orgs","repos_url":"https://api.github.com/users/fizyr/repos","events_url":"https://api.github.com/users/fizyr/events{/privacy}","received_events_url":"https://api.github.com/users/fizyr/received_events","type":"Organization","site_admin":false},"repo":{"id":100249425,"name":"keras-retinanet","full_name":"fizyr/keras-retinanet","owner":{"login":"fizyr","id":14974733,"avatar_url":"https://avatars0.githubusercontent.com/u/14974733?v=4","gravatar_id":"","url":"https://api.github.com/users/fizyr","html_url":"https://github.com/fizyr","followers_url":"https://api.github.com/users/fizyr/followers","following_url":"https://api.github.com/users/fizyr/following{/other_user}","gists_url":"https://api.github.com/users/fizyr/gists{/gist_id}","starred_url":"https://api.github.com/users/fizyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fizyr/subscriptions","organizations_url":"https://api.github.com/users/fizyr/orgs","repos_url":"https://api.github.com/users/fizyr/repos","events_url":"https://api.github.com/users/fizyr/events{/privacy}","received_events_url":"https://api.github.com/users/fizyr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fizyr/keras-retinanet","description":"Keras implementation of RetinaNet object detection.","fork":false,"url":"https://api.github.com/repos/fizyr/keras-retinanet","forks_url":"https://api.github.com/repos/fizyr/keras-retinanet/forks","keys_url":"https://api.github.com/repos/fizyr/keras-retinanet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fizyr/keras-retinanet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fizyr/keras-retinanet/teams","hooks_url":"https://api.github.com/repos/fizyr/keras-retinanet/hooks","issue_events_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/events{/number}","events_url":"https://api.github.com/repos/fizyr/keras-retinanet/events","assignees_url":"https://api.github.com/repos/fizyr/keras-retinanet/assignees{/user}","branches_url":"https://api.github.com/repos/fizyr/keras-retinanet/branches{/branch}","tags_url":"https://api.github.com/repos/fizyr/keras-retinanet/tags","blobs_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/refs{/sha}","trees_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fizyr/keras-retinanet/statuses/{sha}","languages_url":"https://api.github.com/repos/fizyr/keras-retinanet/languages","stargazers_url":"https://api.github.com/repos/fizyr/keras-retinanet/stargazers","contributors_url":"https://api.github.com/repos/fizyr/keras-retinanet/contributors","subscribers_url":"https://api.github.com/repos/fizyr/keras-retinanet/subscribers","subscription_url":"https://api.github.com/repos/fizyr/keras-retinanet/subscription","commits_url":"https://api.github.com/repos/fizyr/keras-retinanet/commits{/sha}","git_commits_url":"https://api.github.com/repos/fizyr/keras-retinanet/git/commits{/sha}","comments_url":"https://api.github.com/repos/fizyr/keras-retinanet/comments{/number}","issue_comment_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues/comments{/number}","contents_url":"https://api.github.com/repos/fizyr/keras-retinanet/contents/{+path}","compare_url":"https://api.github.com/repos/fizyr/keras-retinanet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fizyr/keras-retinanet/merges","archive_url":"https://api.github.com/repos/fizyr/keras-retinanet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fizyr/keras-retinanet/downloads","issues_url":"https://api.github.com/repos/fizyr/keras-retinanet/issues{/number}","pulls_url":"https://api.github.com/repos/fizyr/keras-retinanet/pulls{/number}","milestones_url":"https://api.github.com/repos/fizyr/keras-retinanet/milestones{/number}","notifications_url":"https://api.github.com/repos/fizyr/keras-retinanet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fizyr/keras-retinanet/labels{/name}","releases_url":"https://api.github.com/repos/fizyr/keras-retinanet/releases{/id}","deployments_url":"https://api.github.com/repos/fizyr/keras-retinanet/deployments","created_at":"2017-08-14T09:14:29Z","updated_at":"2018-02-23T21:43:22Z","pushed_at":"2018-02-24T05:28:25Z","git_url":"git://github.com/fizyr/keras-retinanet.git","ssh_url":"git@github.com:fizyr/keras-retinanet.git","clone_url":"https://github.com/fizyr/keras-retinanet.git","svn_url":"https://github.com/fizyr/keras-retinanet","homepage":null,"size":7485,"stargazers_count":472,"watchers_count":472,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":193,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":193,"open_issues":15,"watchers":472,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/298"},"html":{"href":"https://github.com/fizyr/keras-retinanet/pull/298"},"issue":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/issues/298"},"comments":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/fizyr/keras-retinanet/statuses/540bbad3ebe569c578c9eccf605cc9b82b4e9f20"}},"author_association":"NONE"}}
{"actor":{"display_login":"hgaiser"}}