{"action":"created","comment":{"url":"https://api.github.com/repos/pytorch/vision/pulls/comments/167525717","pull_request_review_id":95755631,"id":167525717,"diff_hunk":"@@ -734,6 +735,109 @@ def test_rotate(self):\n \n         assert np.all(np.array(result_a) == np.array(result_b))\n \n+    def test_affine(self):\n+        x = np.zeros((100, 100, 3), dtype=np.uint8)","path":"test/test_transforms.py","position":13,"original_position":13,"commit_id":"5940685d8aeb3dff686246762e4b4d25b8ae2312","original_commit_id":"5940685d8aeb3dff686246762e4b4d25b8ae2312","user":{"login":"vfdev-5","id":2459423,"avatar_url":"https://avatars0.githubusercontent.com/u/2459423?v=4","gravatar_id":"","url":"https://api.github.com/users/vfdev-5","html_url":"https://github.com/vfdev-5","followers_url":"https://api.github.com/users/vfdev-5/followers","following_url":"https://api.github.com/users/vfdev-5/following{/other_user}","gists_url":"https://api.github.com/users/vfdev-5/gists{/gist_id}","starred_url":"https://api.github.com/users/vfdev-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfdev-5/subscriptions","organizations_url":"https://api.github.com/users/vfdev-5/orgs","repos_url":"https://api.github.com/users/vfdev-5/repos","events_url":"https://api.github.com/users/vfdev-5/events{/privacy}","received_events_url":"https://api.github.com/users/vfdev-5/received_events","type":"User","site_admin":false},"body":"@fmassa I'm not sure if I understood you correctly, but actually, the input image is not completely all zero but zero with 3 white points = edges of the letter L with the last point in the center of the image\r\n```\r\n        x = np.zeros((100, 100, 3), dtype=np.uint8)\r\n        pts = [(40, 40), (50, 40), (50, 50)]\r\n        cnt = [50, 50]\r\n        for pt in pts:\r\n            x[pt] = [255, 255, 255]\r\n``` \r\nand in the test there is a check if manually warped points for example [here](https://github.com/vfdev-5/vision/blob/5940685d8aeb3dff686246762e4b4d25b8ae2312/test/test_transforms.py#L755) can be found in non-null locations of the warped image (warped with `F.affine`). \r\nCould you explain me how to check the transformation differently? Thanks","created_at":"2018-02-12T11:17:51Z","updated_at":"2018-02-12T11:17:52Z","html_url":"https://github.com/pytorch/vision/pull/411#discussion_r167525717","pull_request_url":"https://api.github.com/repos/pytorch/vision/pulls/411","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pytorch/vision/pulls/comments/167525717"},"html":{"href":"https://github.com/pytorch/vision/pull/411#discussion_r167525717"},"pull_request":{"href":"https://api.github.com/repos/pytorch/vision/pulls/411"}},"in_reply_to_id":167509441},"pull_request":{"url":"https://api.github.com/repos/pytorch/vision/pulls/411","id":167917476,"html_url":"https://github.com/pytorch/vision/pull/411","diff_url":"https://github.com/pytorch/vision/pull/411.diff","patch_url":"https://github.com/pytorch/vision/pull/411.patch","issue_url":"https://api.github.com/repos/pytorch/vision/issues/411","number":411,"state":"open","locked":false,"title":"Add random affine transformation","user":{"login":"vfdev-5","id":2459423,"avatar_url":"https://avatars0.githubusercontent.com/u/2459423?v=4","gravatar_id":"","url":"https://api.github.com/users/vfdev-5","html_url":"https://github.com/vfdev-5","followers_url":"https://api.github.com/users/vfdev-5/followers","following_url":"https://api.github.com/users/vfdev-5/following{/other_user}","gists_url":"https://api.github.com/users/vfdev-5/gists{/gist_id}","starred_url":"https://api.github.com/users/vfdev-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfdev-5/subscriptions","organizations_url":"https://api.github.com/users/vfdev-5/orgs","repos_url":"https://api.github.com/users/vfdev-5/repos","events_url":"https://api.github.com/users/vfdev-5/events{/privacy}","received_events_url":"https://api.github.com/users/vfdev-5/received_events","type":"User","site_admin":false},"body":"Random affine transformations with tests.\r\nFor usage, see [sanity_check.ipynb](https://github.com/vfdev-5/vision/blob/5940685d8aeb3dff686246762e4b4d25b8ae2312/test/sanity_checks.ipynb)\r\n","created_at":"2018-02-08T09:29:30Z","updated_at":"2018-02-12T11:17:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffd65805afefa40dcdacec39908f55d552c4a945","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pytorch/vision/pulls/411/commits","review_comments_url":"https://api.github.com/repos/pytorch/vision/pulls/411/comments","review_comment_url":"https://api.github.com/repos/pytorch/vision/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pytorch/vision/issues/411/comments","statuses_url":"https://api.github.com/repos/pytorch/vision/statuses/5940685d8aeb3dff686246762e4b4d25b8ae2312","head":{"label":"vfdev-5:random_affine","ref":"random_affine","sha":"5940685d8aeb3dff686246762e4b4d25b8ae2312","user":{"login":"vfdev-5","id":2459423,"avatar_url":"https://avatars0.githubusercontent.com/u/2459423?v=4","gravatar_id":"","url":"https://api.github.com/users/vfdev-5","html_url":"https://github.com/vfdev-5","followers_url":"https://api.github.com/users/vfdev-5/followers","following_url":"https://api.github.com/users/vfdev-5/following{/other_user}","gists_url":"https://api.github.com/users/vfdev-5/gists{/gist_id}","starred_url":"https://api.github.com/users/vfdev-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfdev-5/subscriptions","organizations_url":"https://api.github.com/users/vfdev-5/orgs","repos_url":"https://api.github.com/users/vfdev-5/repos","events_url":"https://api.github.com/users/vfdev-5/events{/privacy}","received_events_url":"https://api.github.com/users/vfdev-5/received_events","type":"User","site_admin":false},"repo":{"id":112882307,"name":"vision","full_name":"vfdev-5/vision","owner":{"login":"vfdev-5","id":2459423,"avatar_url":"https://avatars0.githubusercontent.com/u/2459423?v=4","gravatar_id":"","url":"https://api.github.com/users/vfdev-5","html_url":"https://github.com/vfdev-5","followers_url":"https://api.github.com/users/vfdev-5/followers","following_url":"https://api.github.com/users/vfdev-5/following{/other_user}","gists_url":"https://api.github.com/users/vfdev-5/gists{/gist_id}","starred_url":"https://api.github.com/users/vfdev-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfdev-5/subscriptions","organizations_url":"https://api.github.com/users/vfdev-5/orgs","repos_url":"https://api.github.com/users/vfdev-5/repos","events_url":"https://api.github.com/users/vfdev-5/events{/privacy}","received_events_url":"https://api.github.com/users/vfdev-5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vfdev-5/vision","description":"Datasets, Transforms and Models specific to Computer Vision","fork":true,"url":"https://api.github.com/repos/vfdev-5/vision","forks_url":"https://api.github.com/repos/vfdev-5/vision/forks","keys_url":"https://api.github.com/repos/vfdev-5/vision/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vfdev-5/vision/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vfdev-5/vision/teams","hooks_url":"https://api.github.com/repos/vfdev-5/vision/hooks","issue_events_url":"https://api.github.com/repos/vfdev-5/vision/issues/events{/number}","events_url":"https://api.github.com/repos/vfdev-5/vision/events","assignees_url":"https://api.github.com/repos/vfdev-5/vision/assignees{/user}","branches_url":"https://api.github.com/repos/vfdev-5/vision/branches{/branch}","tags_url":"https://api.github.com/repos/vfdev-5/vision/tags","blobs_url":"https://api.github.com/repos/vfdev-5/vision/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vfdev-5/vision/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vfdev-5/vision/git/refs{/sha}","trees_url":"https://api.github.com/repos/vfdev-5/vision/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vfdev-5/vision/statuses/{sha}","languages_url":"https://api.github.com/repos/vfdev-5/vision/languages","stargazers_url":"https://api.github.com/repos/vfdev-5/vision/stargazers","contributors_url":"https://api.github.com/repos/vfdev-5/vision/contributors","subscribers_url":"https://api.github.com/repos/vfdev-5/vision/subscribers","subscription_url":"https://api.github.com/repos/vfdev-5/vision/subscription","commits_url":"https://api.github.com/repos/vfdev-5/vision/commits{/sha}","git_commits_url":"https://api.github.com/repos/vfdev-5/vision/git/commits{/sha}","comments_url":"https://api.github.com/repos/vfdev-5/vision/comments{/number}","issue_comment_url":"https://api.github.com/repos/vfdev-5/vision/issues/comments{/number}","contents_url":"https://api.github.com/repos/vfdev-5/vision/contents/{+path}","compare_url":"https://api.github.com/repos/vfdev-5/vision/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vfdev-5/vision/merges","archive_url":"https://api.github.com/repos/vfdev-5/vision/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vfdev-5/vision/downloads","issues_url":"https://api.github.com/repos/vfdev-5/vision/issues{/number}","pulls_url":"https://api.github.com/repos/vfdev-5/vision/pulls{/number}","milestones_url":"https://api.github.com/repos/vfdev-5/vision/milestones{/number}","notifications_url":"https://api.github.com/repos/vfdev-5/vision/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vfdev-5/vision/labels{/name}","releases_url":"https://api.github.com/repos/vfdev-5/vision/releases{/id}","deployments_url":"https://api.github.com/repos/vfdev-5/vision/deployments","created_at":"2017-12-02T22:36:12Z","updated_at":"2017-12-02T22:36:14Z","pushed_at":"2018-02-12T10:46:43Z","git_url":"git://github.com/vfdev-5/vision.git","ssh_url":"git@github.com:vfdev-5/vision.git","clone_url":"https://github.com/vfdev-5/vision.git","svn_url":"https://github.com/vfdev-5/vision","homepage":null,"size":1920,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pytorch:master","ref":"master","sha":"a614af3f10732dbe99995066bf43517a605a5044","user":{"login":"pytorch","id":21003710,"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":73328905,"name":"vision","full_name":"pytorch/vision","owner":{"login":"pytorch","id":21003710,"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},"private":false,"html_url":"https://github.com/pytorch/vision","description":"Datasets, Transforms and Models specific to Computer Vision","fork":false,"url":"https://api.github.com/repos/pytorch/vision","forks_url":"https://api.github.com/repos/pytorch/vision/forks","keys_url":"https://api.github.com/repos/pytorch/vision/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pytorch/vision/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pytorch/vision/teams","hooks_url":"https://api.github.com/repos/pytorch/vision/hooks","issue_events_url":"https://api.github.com/repos/pytorch/vision/issues/events{/number}","events_url":"https://api.github.com/repos/pytorch/vision/events","assignees_url":"https://api.github.com/repos/pytorch/vision/assignees{/user}","branches_url":"https://api.github.com/repos/pytorch/vision/branches{/branch}","tags_url":"https://api.github.com/repos/pytorch/vision/tags","blobs_url":"https://api.github.com/repos/pytorch/vision/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pytorch/vision/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pytorch/vision/git/refs{/sha}","trees_url":"https://api.github.com/repos/pytorch/vision/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pytorch/vision/statuses/{sha}","languages_url":"https://api.github.com/repos/pytorch/vision/languages","stargazers_url":"https://api.github.com/repos/pytorch/vision/stargazers","contributors_url":"https://api.github.com/repos/pytorch/vision/contributors","subscribers_url":"https://api.github.com/repos/pytorch/vision/subscribers","subscription_url":"https://api.github.com/repos/pytorch/vision/subscription","commits_url":"https://api.github.com/repos/pytorch/vision/commits{/sha}","git_commits_url":"https://api.github.com/repos/pytorch/vision/git/commits{/sha}","comments_url":"https://api.github.com/repos/pytorch/vision/comments{/number}","issue_comment_url":"https://api.github.com/repos/pytorch/vision/issues/comments{/number}","contents_url":"https://api.github.com/repos/pytorch/vision/contents/{+path}","compare_url":"https://api.github.com/repos/pytorch/vision/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pytorch/vision/merges","archive_url":"https://api.github.com/repos/pytorch/vision/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pytorch/vision/downloads","issues_url":"https://api.github.com/repos/pytorch/vision/issues{/number}","pulls_url":"https://api.github.com/repos/pytorch/vision/pulls{/number}","milestones_url":"https://api.github.com/repos/pytorch/vision/milestones{/number}","notifications_url":"https://api.github.com/repos/pytorch/vision/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pytorch/vision/labels{/name}","releases_url":"https://api.github.com/repos/pytorch/vision/releases{/id}","deployments_url":"https://api.github.com/repos/pytorch/vision/deployments","created_at":"2016-11-09T23:11:43Z","updated_at":"2018-02-12T11:08:51Z","pushed_at":"2018-02-12T10:46:12Z","git_url":"git://github.com/pytorch/vision.git","ssh_url":"git@github.com:pytorch/vision.git","clone_url":"https://github.com/pytorch/vision.git","svn_url":"https://github.com/pytorch/vision","homepage":null,"size":626,"stargazers_count":1149,"watchers_count":1149,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":509,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":509,"open_issues":65,"watchers":1149,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pytorch/vision/pulls/411"},"html":{"href":"https://github.com/pytorch/vision/pull/411"},"issue":{"href":"https://api.github.com/repos/pytorch/vision/issues/411"},"comments":{"href":"https://api.github.com/repos/pytorch/vision/issues/411/comments"},"review_comments":{"href":"https://api.github.com/repos/pytorch/vision/pulls/411/comments"},"review_comment":{"href":"https://api.github.com/repos/pytorch/vision/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pytorch/vision/pulls/411/commits"},"statuses":{"href":"https://api.github.com/repos/pytorch/vision/statuses/5940685d8aeb3dff686246762e4b4d25b8ae2312"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vfdev-5"}}