KEMBAR78
More strict shape check on Conv operators. by sighingnow · Pull Request #4637 · pytorch/pytorch · GitHub
Skip to content

Conversation

@sighingnow
Copy link
Contributor

Add more strict shape check on Conv operators. The computed input size should never less than kernel size.

This patch should fix issue #4607

Signed-off-by: HE, Tao <sighingnow@gmail.com>
Signed-off-by: HE, Tao <sighingnow@gmail.com>
Signed-off-by: HE, Tao <sighingnow@gmail.com>
Copy link
Member

@soumith soumith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks a lot!

@soumith
Copy link
Member

soumith commented Jan 12, 2018

@pytorchbot test this please

@ssnl
Copy link
Collaborator

ssnl commented Jan 12, 2018

Maybe cudnn code path also has something that checks this, but it feels that these checks can be at ATen level since they are pretty general, e.g. here https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/Convolution.cpp#L156.

@soumith soumith merged commit 5343b71 into pytorch:master Jan 12, 2018
@soumith
Copy link
Member

soumith commented Jan 12, 2018

not a bad idea to have them at ATen level, now that it's becoming the way everything is exposed. But it's just a safe thing to fix the THNN checks, they were incorrect.

@sighingnow sighingnow deleted the conv-shapecheck branch January 13, 2018 04:32
@soumith soumith added the 0.3.1 label Feb 5, 2018
soumith pushed a commit that referenced this pull request Feb 7, 2018
* More strict shape check on Conv operators.

Signed-off-by: HE, Tao <sighingnow@gmail.com>

* Test case for conv's shape check.

Signed-off-by: HE, Tao <sighingnow@gmail.com>

* Fix lint.

Signed-off-by: HE, Tao <sighingnow@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants