{"action":"created","comment":{"url":"https://api.github.com/repos/onnx/onnx/pulls/comments/197351489","pull_request_review_id":131078151,"id":197351489,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzM1MTQ4OQ==","diff_hunk":"@@ -0,0 +1,48 @@\n+# ONNX Optimizer\n+\n+ONNX provides a C++ library for performing arbitrary optimizations on\n+ONNX graphs, as well as a growing list of prepackaged optimization\n+passes. The library also provides a convenient in-memory\n+representation that is much more convenient to manipulate than the raw\n+protobuf structs, and converters to and from the protobuf format.\n+\n+The primary motivation is to share work between the many ONNX backend\n+implementations. Not all possible optimizations can be directly\n+implemented on ONNX graphs - some will need additional\n+backend-specific information - but many can, and our aim is to provide\n+all such passes along with ONNX so that they can be re-used with a\n+single function call.\n+\n+You may be interested in invoking the provided passes, or in\n+implementing new ones (or both).\n+\n+## Invoking The Optimizer\n+\n+The optimizer may be invoked either via C++ or Python. The Python API\n+is described, with example,\n+[here](docs/PythonAPIOverview.md#optimizing-an-onnx-model).\n+\n+The C++ API consists of a single function\n+\n+```\n+ModelProto Optimize(\n+    const ModelProto& mp_in,\n+    const std::vector<std::string>& names);\n+```\n+\n+which accepts an input `ModelProto` and a list of optimization passes to\n+apply, and which returns a new `ModelProto` which is the result of\n+applying each of the named passes in sequence to the model. For a list\n+of available passes, see [optimize.h](onnx/optimizer/optimize.h).\n+\n+## Implementing Optimization Passes\n+\n+You can implement a new optimization pass by subclassing\n+`OptimizePass`, and registering your new pass with\n+`Optimizer::_registerOptimizer()`. Optimization passes operate on an","path":"docs/Optimizer.md","position":42,"original_position":42,"commit_id":"478a1f12b0fcca2bc0646fb87626d59e9768b2d8","original_commit_id":"478a1f12b0fcca2bc0646fb87626d59e9768b2d8","user":{"login":"bddppq","id":9300575,"node_id":"MDQ6VXNlcjkzMDA1NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/9300575?v=4","gravatar_id":"","url":"https://api.github.com/users/bddppq","html_url":"https://github.com/bddppq","followers_url":"https://api.github.com/users/bddppq/followers","following_url":"https://api.github.com/users/bddppq/following{/other_user}","gists_url":"https://api.github.com/users/bddppq/gists{/gist_id}","starred_url":"https://api.github.com/users/bddppq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bddppq/subscriptions","organizations_url":"https://api.github.com/users/bddppq/orgs","repos_url":"https://api.github.com/users/bddppq/repos","events_url":"https://api.github.com/users/bddppq/events{/privacy}","received_events_url":"https://api.github.com/users/bddppq/received_events","type":"User","site_admin":false},"body":"Is `_registerOptimizer ` supposed to be a public function? If so shall we remove the `_`?","created_at":"2018-06-22T06:30:19Z","updated_at":"2018-06-22T06:35:16Z","html_url":"https://github.com/onnx/onnx/pull/1134#discussion_r197351489","pull_request_url":"https://api.github.com/repos/onnx/onnx/pulls/1134","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/onnx/onnx/pulls/comments/197351489"},"html":{"href":"https://github.com/onnx/onnx/pull/1134#discussion_r197351489"},"pull_request":{"href":"https://api.github.com/repos/onnx/onnx/pulls/1134"}}},"pull_request":{"url":"https://api.github.com/repos/onnx/onnx/pulls/1134","id":196560838,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2NTYwODM4","html_url":"https://github.com/onnx/onnx/pull/1134","diff_url":"https://github.com/onnx/onnx/pull/1134.diff","patch_url":"https://github.com/onnx/onnx/pull/1134.patch","issue_url":"https://api.github.com/repos/onnx/onnx/issues/1134","number":1134,"state":"open","locked":false,"title":"Document Shape Inference and Optimizer utilities","user":{"login":"anderspapitto","id":1388690,"node_id":"MDQ6VXNlcjEzODg2OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1388690?v=4","gravatar_id":"","url":"https://api.github.com/users/anderspapitto","html_url":"https://github.com/anderspapitto","followers_url":"https://api.github.com/users/anderspapitto/followers","following_url":"https://api.github.com/users/anderspapitto/following{/other_user}","gists_url":"https://api.github.com/users/anderspapitto/gists{/gist_id}","starred_url":"https://api.github.com/users/anderspapitto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderspapitto/subscriptions","organizations_url":"https://api.github.com/users/anderspapitto/orgs","repos_url":"https://api.github.com/users/anderspapitto/repos","events_url":"https://api.github.com/users/anderspapitto/events{/privacy}","received_events_url":"https://api.github.com/users/anderspapitto/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-21T20:05:17Z","updated_at":"2018-06-22T06:35:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a73d5d4245ac40bbf6506049ac80949805e936c0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dzhulgakov","id":17890620,"node_id":"MDQ6VXNlcjE3ODkwNjIw","avatar_url":"https://avatars2.githubusercontent.com/u/17890620?v=4","gravatar_id":"","url":"https://api.github.com/users/dzhulgakov","html_url":"https://github.com/dzhulgakov","followers_url":"https://api.github.com/users/dzhulgakov/followers","following_url":"https://api.github.com/users/dzhulgakov/following{/other_user}","gists_url":"https://api.github.com/users/dzhulgakov/gists{/gist_id}","starred_url":"https://api.github.com/users/dzhulgakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzhulgakov/subscriptions","organizations_url":"https://api.github.com/users/dzhulgakov/orgs","repos_url":"https://api.github.com/users/dzhulgakov/repos","events_url":"https://api.github.com/users/dzhulgakov/events{/privacy}","received_events_url":"https://api.github.com/users/dzhulgakov/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/onnx/onnx/pulls/1134/commits","review_comments_url":"https://api.github.com/repos/onnx/onnx/pulls/1134/comments","review_comment_url":"https://api.github.com/repos/onnx/onnx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/onnx/onnx/issues/1134/comments","statuses_url":"https://api.github.com/repos/onnx/onnx/statuses/478a1f12b0fcca2bc0646fb87626d59e9768b2d8","head":{"label":"anderspapitto:docs","ref":"docs","sha":"478a1f12b0fcca2bc0646fb87626d59e9768b2d8","user":{"login":"anderspapitto","id":1388690,"node_id":"MDQ6VXNlcjEzODg2OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1388690?v=4","gravatar_id":"","url":"https://api.github.com/users/anderspapitto","html_url":"https://github.com/anderspapitto","followers_url":"https://api.github.com/users/anderspapitto/followers","following_url":"https://api.github.com/users/anderspapitto/following{/other_user}","gists_url":"https://api.github.com/users/anderspapitto/gists{/gist_id}","starred_url":"https://api.github.com/users/anderspapitto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderspapitto/subscriptions","organizations_url":"https://api.github.com/users/anderspapitto/orgs","repos_url":"https://api.github.com/users/anderspapitto/repos","events_url":"https://api.github.com/users/anderspapitto/events{/privacy}","received_events_url":"https://api.github.com/users/anderspapitto/received_events","type":"User","site_admin":false},"repo":{"id":116178271,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYxNzgyNzE=","name":"onnx","full_name":"anderspapitto/onnx","owner":{"login":"anderspapitto","id":1388690,"node_id":"MDQ6VXNlcjEzODg2OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1388690?v=4","gravatar_id":"","url":"https://api.github.com/users/anderspapitto","html_url":"https://github.com/anderspapitto","followers_url":"https://api.github.com/users/anderspapitto/followers","following_url":"https://api.github.com/users/anderspapitto/following{/other_user}","gists_url":"https://api.github.com/users/anderspapitto/gists{/gist_id}","starred_url":"https://api.github.com/users/anderspapitto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderspapitto/subscriptions","organizations_url":"https://api.github.com/users/anderspapitto/orgs","repos_url":"https://api.github.com/users/anderspapitto/repos","events_url":"https://api.github.com/users/anderspapitto/events{/privacy}","received_events_url":"https://api.github.com/users/anderspapitto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anderspapitto/onnx","description":"Open Neural Network Exchange","fork":true,"url":"https://api.github.com/repos/anderspapitto/onnx","forks_url":"https://api.github.com/repos/anderspapitto/onnx/forks","keys_url":"https://api.github.com/repos/anderspapitto/onnx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anderspapitto/onnx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anderspapitto/onnx/teams","hooks_url":"https://api.github.com/repos/anderspapitto/onnx/hooks","issue_events_url":"https://api.github.com/repos/anderspapitto/onnx/issues/events{/number}","events_url":"https://api.github.com/repos/anderspapitto/onnx/events","assignees_url":"https://api.github.com/repos/anderspapitto/onnx/assignees{/user}","branches_url":"https://api.github.com/repos/anderspapitto/onnx/branches{/branch}","tags_url":"https://api.github.com/repos/anderspapitto/onnx/tags","blobs_url":"https://api.github.com/repos/anderspapitto/onnx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anderspapitto/onnx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anderspapitto/onnx/git/refs{/sha}","trees_url":"https://api.github.com/repos/anderspapitto/onnx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anderspapitto/onnx/statuses/{sha}","languages_url":"https://api.github.com/repos/anderspapitto/onnx/languages","stargazers_url":"https://api.github.com/repos/anderspapitto/onnx/stargazers","contributors_url":"https://api.github.com/repos/anderspapitto/onnx/contributors","subscribers_url":"https://api.github.com/repos/anderspapitto/onnx/subscribers","subscription_url":"https://api.github.com/repos/anderspapitto/onnx/subscription","commits_url":"https://api.github.com/repos/anderspapitto/onnx/commits{/sha}","git_commits_url":"https://api.github.com/repos/anderspapitto/onnx/git/commits{/sha}","comments_url":"https://api.github.com/repos/anderspapitto/onnx/comments{/number}","issue_comment_url":"https://api.github.com/repos/anderspapitto/onnx/issues/comments{/number}","contents_url":"https://api.github.com/repos/anderspapitto/onnx/contents/{+path}","compare_url":"https://api.github.com/repos/anderspapitto/onnx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anderspapitto/onnx/merges","archive_url":"https://api.github.com/repos/anderspapitto/onnx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anderspapitto/onnx/downloads","issues_url":"https://api.github.com/repos/anderspapitto/onnx/issues{/number}","pulls_url":"https://api.github.com/repos/anderspapitto/onnx/pulls{/number}","milestones_url":"https://api.github.com/repos/anderspapitto/onnx/milestones{/number}","notifications_url":"https://api.github.com/repos/anderspapitto/onnx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anderspapitto/onnx/labels{/name}","releases_url":"https://api.github.com/repos/anderspapitto/onnx/releases{/id}","deployments_url":"https://api.github.com/repos/anderspapitto/onnx/deployments","created_at":"2018-01-03T20:20:05Z","updated_at":"2018-06-21T18:26:55Z","pushed_at":"2018-06-21T20:30:24Z","git_url":"git://github.com/anderspapitto/onnx.git","ssh_url":"git@github.com:anderspapitto/onnx.git","clone_url":"https://github.com/anderspapitto/onnx.git","svn_url":"https://github.com/anderspapitto/onnx","homepage":"https://onnx.ai/","size":5596,"stargazers_count":0,"watchers_count":0,"language":"PureBasic","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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"onnx:master","ref":"master","sha":"9b9f595107e3fc0295d50f6294d43879df17552f","user":{"login":"onnx","id":31675368,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjc1MzY4","avatar_url":"https://avatars3.githubusercontent.com/u/31675368?v=4","gravatar_id":"","url":"https://api.github.com/users/onnx","html_url":"https://github.com/onnx","followers_url":"https://api.github.com/users/onnx/followers","following_url":"https://api.github.com/users/onnx/following{/other_user}","gists_url":"https://api.github.com/users/onnx/gists{/gist_id}","starred_url":"https://api.github.com/users/onnx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onnx/subscriptions","organizations_url":"https://api.github.com/users/onnx/orgs","repos_url":"https://api.github.com/users/onnx/repos","events_url":"https://api.github.com/users/onnx/events{/privacy}","received_events_url":"https://api.github.com/users/onnx/received_events","type":"Organization","site_admin":false},"repo":{"id":102692863,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI2OTI4NjM=","name":"onnx","full_name":"onnx/onnx","owner":{"login":"onnx","id":31675368,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNjc1MzY4","avatar_url":"https://avatars3.githubusercontent.com/u/31675368?v=4","gravatar_id":"","url":"https://api.github.com/users/onnx","html_url":"https://github.com/onnx","followers_url":"https://api.github.com/users/onnx/followers","following_url":"https://api.github.com/users/onnx/following{/other_user}","gists_url":"https://api.github.com/users/onnx/gists{/gist_id}","starred_url":"https://api.github.com/users/onnx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onnx/subscriptions","organizations_url":"https://api.github.com/users/onnx/orgs","repos_url":"https://api.github.com/users/onnx/repos","events_url":"https://api.github.com/users/onnx/events{/privacy}","received_events_url":"https://api.github.com/users/onnx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/onnx/onnx","description":"Open Neural Network Exchange","fork":false,"url":"https://api.github.com/repos/onnx/onnx","forks_url":"https://api.github.com/repos/onnx/onnx/forks","keys_url":"https://api.github.com/repos/onnx/onnx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onnx/onnx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onnx/onnx/teams","hooks_url":"https://api.github.com/repos/onnx/onnx/hooks","issue_events_url":"https://api.github.com/repos/onnx/onnx/issues/events{/number}","events_url":"https://api.github.com/repos/onnx/onnx/events","assignees_url":"https://api.github.com/repos/onnx/onnx/assignees{/user}","branches_url":"https://api.github.com/repos/onnx/onnx/branches{/branch}","tags_url":"https://api.github.com/repos/onnx/onnx/tags","blobs_url":"https://api.github.com/repos/onnx/onnx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onnx/onnx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onnx/onnx/git/refs{/sha}","trees_url":"https://api.github.com/repos/onnx/onnx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onnx/onnx/statuses/{sha}","languages_url":"https://api.github.com/repos/onnx/onnx/languages","stargazers_url":"https://api.github.com/repos/onnx/onnx/stargazers","contributors_url":"https://api.github.com/repos/onnx/onnx/contributors","subscribers_url":"https://api.github.com/repos/onnx/onnx/subscribers","subscription_url":"https://api.github.com/repos/onnx/onnx/subscription","commits_url":"https://api.github.com/repos/onnx/onnx/commits{/sha}","git_commits_url":"https://api.github.com/repos/onnx/onnx/git/commits{/sha}","comments_url":"https://api.github.com/repos/onnx/onnx/comments{/number}","issue_comment_url":"https://api.github.com/repos/onnx/onnx/issues/comments{/number}","contents_url":"https://api.github.com/repos/onnx/onnx/contents/{+path}","compare_url":"https://api.github.com/repos/onnx/onnx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onnx/onnx/merges","archive_url":"https://api.github.com/repos/onnx/onnx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onnx/onnx/downloads","issues_url":"https://api.github.com/repos/onnx/onnx/issues{/number}","pulls_url":"https://api.github.com/repos/onnx/onnx/pulls{/number}","milestones_url":"https://api.github.com/repos/onnx/onnx/milestones{/number}","notifications_url":"https://api.github.com/repos/onnx/onnx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onnx/onnx/labels{/name}","releases_url":"https://api.github.com/repos/onnx/onnx/releases{/id}","deployments_url":"https://api.github.com/repos/onnx/onnx/deployments","created_at":"2017-09-07T04:53:45Z","updated_at":"2018-06-22T06:34:48Z","pushed_at":"2018-06-22T06:34:44Z","git_url":"git://github.com/onnx/onnx.git","ssh_url":"git@github.com:onnx/onnx.git","clone_url":"https://github.com/onnx/onnx.git","svn_url":"https://github.com/onnx/onnx","homepage":"https://onnx.ai/","size":5642,"stargazers_count":3696,"watchers_count":3696,"language":"PureBasic","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":476,"mirror_url":null,"archived":false,"open_issues_count":201,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":476,"open_issues":201,"watchers":3696,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/onnx/onnx/pulls/1134"},"html":{"href":"https://github.com/onnx/onnx/pull/1134"},"issue":{"href":"https://api.github.com/repos/onnx/onnx/issues/1134"},"comments":{"href":"https://api.github.com/repos/onnx/onnx/issues/1134/comments"},"review_comments":{"href":"https://api.github.com/repos/onnx/onnx/pulls/1134/comments"},"review_comment":{"href":"https://api.github.com/repos/onnx/onnx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/onnx/onnx/pulls/1134/commits"},"statuses":{"href":"https://api.github.com/repos/onnx/onnx/statuses/478a1f12b0fcca2bc0646fb87626d59e9768b2d8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"bddppq"}}