{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/glow/pulls/comments/218085423","pull_request_review_id":155944960,"id":218085423,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODA4NTQyMw==","diff_hunk":"@@ -34,3 +34,10 @@ done\n for png_filename in tests/images/imagenet/*.png; do\n   ./bin/image-classifier \"$png_filename\" -image_mode=0to256 -m=bvlc_alexnet/model.onnx -model_input_name=data_0 \"$@\"\n done\n+#Inference test for TF ONNX models\n+for png_filename in tests/images/imagenet/*.png; do\n+  ./bin/image-classifier \"$png_filename\" -image_mode=0to1 -m=googlenet_v1_slim/googlenet_v1_slim.onnx -model_input_name=input:0 -image_layout=NHWC \"$@\"\n+done\n+for png_filename in tests/images/imagenet_299/*.png; do","path":"tests/images/run.sh","position":8,"original_position":8,"commit_id":"4a468da438c1d27737e9a75bbd0e804e0313d325","original_commit_id":"4a468da438c1d27737e9a75bbd0e804e0313d325","user":{"login":"dmoham1476","id":14185005,"node_id":"MDQ6VXNlcjE0MTg1MDA1","avatar_url":"https://avatars3.githubusercontent.com/u/14185005?v=4","gravatar_id":"","url":"https://api.github.com/users/dmoham1476","html_url":"https://github.com/dmoham1476","followers_url":"https://api.github.com/users/dmoham1476/followers","following_url":"https://api.github.com/users/dmoham1476/following{/other_user}","gists_url":"https://api.github.com/users/dmoham1476/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoham1476/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoham1476/subscriptions","organizations_url":"https://api.github.com/users/dmoham1476/orgs","repos_url":"https://api.github.com/users/dmoham1476/repos","events_url":"https://api.github.com/users/dmoham1476/events{/privacy}","received_events_url":"https://api.github.com/users/dmoham1476/received_events","type":"User","site_admin":false},"body":"I see that tensorflow slim has addressed this between the models by adding a label_offset. Is there an option to add a CLI in the GLOW inferencing to handle this? I agree tweaking intermediate ONNX models can be a very custom approach per model and introduces another step in between.\r\n\r\nThe ResNet and VGG Models have 1000 classes but the ImageNet dataset has 1001\r\nThe ImageNet dataset provided has an empty background class which can be used to fine-tune the model to other tasks. If you try training or fine-tuning the VGG or ResNet models using the ImageNet dataset, you might encounter the following error:\r\n\r\nInvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [1001] rhs shape= [1000]\r\nThis is due to the fact that the VGG and ResNet V1 final layers have only 1000 outputs rather than 1001.\r\n\r\nTo fix this issue, you can set the --labels_offset=1 flag. This results in the ImageNet labels being shifted down by one:","created_at":"2018-09-17T14:14:45Z","updated_at":"2018-09-17T14:14:46Z","html_url":"https://github.com/pytorch/glow/pull/1651#discussion_r218085423","pull_request_url":"https://api.github.com/repos/pytorch/glow/pulls/1651","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/pytorch/glow/pulls/comments/218085423"},"html":{"href":"https://github.com/pytorch/glow/pull/1651#discussion_r218085423"},"pull_request":{"href":"https://api.github.com/repos/pytorch/glow/pulls/1651"}},"in_reply_to_id":217832690},"pull_request":{"url":"https://api.github.com/repos/pytorch/glow/pulls/1651","id":215698922,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1Njk4OTIy","html_url":"https://github.com/pytorch/glow/pull/1651","diff_url":"https://github.com/pytorch/glow/pull/1651.diff","patch_url":"https://github.com/pytorch/glow/pull/1651.patch","issue_url":"https://api.github.com/repos/pytorch/glow/issues/1651","number":1651,"state":"open","locked":false,"title":"Adding inference tests for TF ONNX models","user":{"login":"dmoham1476","id":14185005,"node_id":"MDQ6VXNlcjE0MTg1MDA1","avatar_url":"https://avatars3.githubusercontent.com/u/14185005?v=4","gravatar_id":"","url":"https://api.github.com/users/dmoham1476","html_url":"https://github.com/dmoham1476","followers_url":"https://api.github.com/users/dmoham1476/followers","following_url":"https://api.github.com/users/dmoham1476/following{/other_user}","gists_url":"https://api.github.com/users/dmoham1476/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoham1476/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoham1476/subscriptions","organizations_url":"https://api.github.com/users/dmoham1476/orgs","repos_url":"https://api.github.com/users/dmoham1476/repos","events_url":"https://api.github.com/users/dmoham1476/events{/privacy}","received_events_url":"https://api.github.com/users/dmoham1476/received_events","type":"User","site_admin":false},"body":"*Description* Added inference test for googlenet_v1_slim.onnx and googlenet_v4_slim.onnx, the support for which was enabled using PR#1589 and #1558\r\n\r\n*Testing* Verified inference results with inference on tensorflow serving.\r\n","created_at":"2018-09-14T20:11:50Z","updated_at":"2018-09-17T14:14:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cbd195bd20a06ad3689dc41e76f28502f1080160","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":706497924,"node_id":"MDU6TGFiZWw3MDY0OTc5MjQ=","url":"https://api.github.com/repos/pytorch/glow/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/glow/pulls/1651/commits","review_comments_url":"https://api.github.com/repos/pytorch/glow/pulls/1651/comments","review_comment_url":"https://api.github.com/repos/pytorch/glow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/glow/issues/1651/comments","statuses_url":"https://api.github.com/repos/pytorch/glow/statuses/4a468da438c1d27737e9a75bbd0e804e0313d325","head":{"label":"dmoham1476:master","ref":"master","sha":"4a468da438c1d27737e9a75bbd0e804e0313d325","user":{"login":"dmoham1476","id":14185005,"node_id":"MDQ6VXNlcjE0MTg1MDA1","avatar_url":"https://avatars3.githubusercontent.com/u/14185005?v=4","gravatar_id":"","url":"https://api.github.com/users/dmoham1476","html_url":"https://github.com/dmoham1476","followers_url":"https://api.github.com/users/dmoham1476/followers","following_url":"https://api.github.com/users/dmoham1476/following{/other_user}","gists_url":"https://api.github.com/users/dmoham1476/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoham1476/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoham1476/subscriptions","organizations_url":"https://api.github.com/users/dmoham1476/orgs","repos_url":"https://api.github.com/users/dmoham1476/repos","events_url":"https://api.github.com/users/dmoham1476/events{/privacy}","received_events_url":"https://api.github.com/users/dmoham1476/received_events","type":"User","site_admin":false},"repo":{"id":146326461,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzMjY0NjE=","name":"glow","full_name":"dmoham1476/glow","private":false,"owner":{"login":"dmoham1476","id":14185005,"node_id":"MDQ6VXNlcjE0MTg1MDA1","avatar_url":"https://avatars3.githubusercontent.com/u/14185005?v=4","gravatar_id":"","url":"https://api.github.com/users/dmoham1476","html_url":"https://github.com/dmoham1476","followers_url":"https://api.github.com/users/dmoham1476/followers","following_url":"https://api.github.com/users/dmoham1476/following{/other_user}","gists_url":"https://api.github.com/users/dmoham1476/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoham1476/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoham1476/subscriptions","organizations_url":"https://api.github.com/users/dmoham1476/orgs","repos_url":"https://api.github.com/users/dmoham1476/repos","events_url":"https://api.github.com/users/dmoham1476/events{/privacy}","received_events_url":"https://api.github.com/users/dmoham1476/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dmoham1476/glow","description":"Compiler for Neural Network hardware accelerators","fork":true,"url":"https://api.github.com/repos/dmoham1476/glow","forks_url":"https://api.github.com/repos/dmoham1476/glow/forks","keys_url":"https://api.github.com/repos/dmoham1476/glow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmoham1476/glow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmoham1476/glow/teams","hooks_url":"https://api.github.com/repos/dmoham1476/glow/hooks","issue_events_url":"https://api.github.com/repos/dmoham1476/glow/issues/events{/number}","events_url":"https://api.github.com/repos/dmoham1476/glow/events","assignees_url":"https://api.github.com/repos/dmoham1476/glow/assignees{/user}","branches_url":"https://api.github.com/repos/dmoham1476/glow/branches{/branch}","tags_url":"https://api.github.com/repos/dmoham1476/glow/tags","blobs_url":"https://api.github.com/repos/dmoham1476/glow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmoham1476/glow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmoham1476/glow/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmoham1476/glow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmoham1476/glow/statuses/{sha}","languages_url":"https://api.github.com/repos/dmoham1476/glow/languages","stargazers_url":"https://api.github.com/repos/dmoham1476/glow/stargazers","contributors_url":"https://api.github.com/repos/dmoham1476/glow/contributors","subscribers_url":"https://api.github.com/repos/dmoham1476/glow/subscribers","subscription_url":"https://api.github.com/repos/dmoham1476/glow/subscription","commits_url":"https://api.github.com/repos/dmoham1476/glow/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmoham1476/glow/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmoham1476/glow/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmoham1476/glow/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmoham1476/glow/contents/{+path}","compare_url":"https://api.github.com/repos/dmoham1476/glow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmoham1476/glow/merges","archive_url":"https://api.github.com/repos/dmoham1476/glow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmoham1476/glow/downloads","issues_url":"https://api.github.com/repos/dmoham1476/glow/issues{/number}","pulls_url":"https://api.github.com/repos/dmoham1476/glow/pulls{/number}","milestones_url":"https://api.github.com/repos/dmoham1476/glow/milestones{/number}","notifications_url":"https://api.github.com/repos/dmoham1476/glow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmoham1476/glow/labels{/name}","releases_url":"https://api.github.com/repos/dmoham1476/glow/releases{/id}","deployments_url":"https://api.github.com/repos/dmoham1476/glow/deployments","created_at":"2018-08-27T16:46:59Z","updated_at":"2018-09-14T20:11:04Z","pushed_at":"2018-09-14T20:11:00Z","git_url":"git://github.com/dmoham1476/glow.git","ssh_url":"git@github.com:dmoham1476/glow.git","clone_url":"https://github.com/dmoham1476/glow.git","svn_url":"https://github.com/dmoham1476/glow","homepage":null,"size":8737,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"8578df96b1b11cf330843d65f575c900fe1c188e","user":{"login":"pytorch","id":21003710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDAzNzEw","avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"repo":{"id":105281531,"node_id":"MDEwOlJlcG9zaXRvcnkxMDUyODE1MzE=","name":"glow","full_name":"pytorch/glow","private":false,"owner":{"login":"pytorch","id":21003710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDAzNzEw","avatar_url":"https://avatars3.githubusercontent.com/u/21003710?v=4","gravatar_id":"","url":"https://api.github.com/users/pytorch","html_url":"https://github.com/pytorch","followers_url":"https://api.github.com/users/pytorch/followers","following_url":"https://api.github.com/users/pytorch/following{/other_user}","gists_url":"https://api.github.com/users/pytorch/gists{/gist_id}","starred_url":"https://api.github.com/users/pytorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pytorch/subscriptions","organizations_url":"https://api.github.com/users/pytorch/orgs","repos_url":"https://api.github.com/users/pytorch/repos","events_url":"https://api.github.com/users/pytorch/events{/privacy}","received_events_url":"https://api.github.com/users/pytorch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pytorch/glow","description":"Compiler for Neural Network hardware accelerators","fork":false,"url":"https://api.github.com/repos/pytorch/glow","forks_url":"https://api.github.com/repos/pytorch/glow/forks","keys_url":"https://api.github.com/repos/pytorch/glow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pytorch/glow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pytorch/glow/teams","hooks_url":"https://api.github.com/repos/pytorch/glow/hooks","issue_events_url":"https://api.github.com/repos/pytorch/glow/issues/events{/number}","events_url":"https://api.github.com/repos/pytorch/glow/events","assignees_url":"https://api.github.com/repos/pytorch/glow/assignees{/user}","branches_url":"https://api.github.com/repos/pytorch/glow/branches{/branch}","tags_url":"https://api.github.com/repos/pytorch/glow/tags","blobs_url":"https://api.github.com/repos/pytorch/glow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pytorch/glow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pytorch/glow/git/refs{/sha}","trees_url":"https://api.github.com/repos/pytorch/glow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pytorch/glow/statuses/{sha}","languages_url":"https://api.github.com/repos/pytorch/glow/languages","stargazers_url":"https://api.github.com/repos/pytorch/glow/stargazers","contributors_url":"https://api.github.com/repos/pytorch/glow/contributors","subscribers_url":"https://api.github.com/repos/pytorch/glow/subscribers","subscription_url":"https://api.github.com/repos/pytorch/glow/subscription","commits_url":"https://api.github.com/repos/pytorch/glow/commits{/sha}","git_commits_url":"https://api.github.com/repos/pytorch/glow/git/commits{/sha}","comments_url":"https://api.github.com/repos/pytorch/glow/comments{/number}","issue_comment_url":"https://api.github.com/repos/pytorch/glow/issues/comments{/number}","contents_url":"https://api.github.com/repos/pytorch/glow/contents/{+path}","compare_url":"https://api.github.com/repos/pytorch/glow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pytorch/glow/merges","archive_url":"https://api.github.com/repos/pytorch/glow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pytorch/glow/downloads","issues_url":"https://api.github.com/repos/pytorch/glow/issues{/number}","pulls_url":"https://api.github.com/repos/pytorch/glow/pulls{/number}","milestones_url":"https://api.github.com/repos/pytorch/glow/milestones{/number}","notifications_url":"https://api.github.com/repos/pytorch/glow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pytorch/glow/labels{/name}","releases_url":"https://api.github.com/repos/pytorch/glow/releases{/id}","deployments_url":"https://api.github.com/repos/pytorch/glow/deployments","created_at":"2017-09-29T14:28:18Z","updated_at":"2018-09-17T13:55:23Z","pushed_at":"2018-09-17T12:11:41Z","git_url":"git://github.com/pytorch/glow.git","ssh_url":"git@github.com:pytorch/glow.git","clone_url":"https://github.com/pytorch/glow.git","svn_url":"https://github.com/pytorch/glow","homepage":null,"size":8240,"stargazers_count":757,"watchers_count":757,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":93,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":93,"open_issues":55,"watchers":757,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/glow/pulls/1651"},"html":{"href":"https://github.com/pytorch/glow/pull/1651"},"issue":{"href":"https://api.github.com/repos/pytorch/glow/issues/1651"},"comments":{"href":"https://api.github.com/repos/pytorch/glow/issues/1651/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/glow/pulls/1651/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/glow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/glow/pulls/1651/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/glow/statuses/4a468da438c1d27737e9a75bbd0e804e0313d325"}},"author_association":"NONE"}}
{"actor":{"display_login":"dmoham1476"}}