{"action":"closed","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5203","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5203/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5203/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/5203/events","html_url":"https://github.com/tensorflow/tensorflow/issues/5203","id":185219635,"number":5203,"title":"Explanation about 'SAME' padding doesn't cover edge cases","user":{"login":"ppwwyyxx","id":1381301,"avatar_url":"https://avatars.githubusercontent.com/u/1381301?v=3","gravatar_id":"","url":"https://api.github.com/users/ppwwyyxx","html_url":"https://github.com/ppwwyyxx","followers_url":"https://api.github.com/users/ppwwyyxx/followers","following_url":"https://api.github.com/users/ppwwyyxx/following{/other_user}","gists_url":"https://api.github.com/users/ppwwyyxx/gists{/gist_id}","starred_url":"https://api.github.com/users/ppwwyyxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppwwyyxx/subscriptions","organizations_url":"https://api.github.com/users/ppwwyyxx/orgs","repos_url":"https://api.github.com/users/ppwwyyxx/repos","events_url":"https://api.github.com/users/ppwwyyxx/events{/privacy}","received_events_url":"https://api.github.com/users/ppwwyyxx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/contributions%20welcome","name":"contributions welcome","color":"009800"},{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-25T20:04:46Z","updated_at":"2016-10-25T21:57:55Z","closed_at":"2016-10-25T21:57:55Z","body":"In the [docs](https://www.tensorflow.org/versions/r0.11/api_docs/python/nn.html#convolution), it explains the padding as follows:\r\n```\r\nFor the 'SAME' padding, the output height and width are computed as:\r\n\r\nout_height = ceil(float(in_height) / float(strides[1]))\r\nout_width  = ceil(float(in_width) / float(strides[2]))\r\n\r\nand the padding on the top and left are computed as:\r\n\r\npad_along_height = ((out_height - 1) * strides[1] +\r\n                    filter_height - in_height)\r\npad_along_width = ((out_width - 1) * strides[2] +\r\n                   filter_width - in_width)\r\npad_top = pad_along_height / 2\r\npad_left = pad_along_width / 2\r\n```\r\nWhen `in_height=20, stride=2, filter_height=1`, we will end up with `pad_along_height=-1`. I think it's unclear what this means (is there padding or not?). Further explanation are needed to document the behavior in this case.\r\n\r\nAlso, when `in_height=19, stride=2, filter_height=1`, we will end up with `out_height=10, pad_along_height=0, pad_top=0`.  But with 19 inputs and stride=2 how can you have 10 output without padding? This doesn't seem right."}}
{"actor":{"display_login":"drpngx"}}