Skip to content

Conversation

@longjon
Copy link
Contributor

@longjon longjon commented Sep 20, 2015

#2049 moved reading and storing of bottom shapes to LayerSetUp, which (silently) breaks reshaping to different input shapes.

This PR fixes that issue. I'm also not sure why another blob was introduced to store the input shape; this PR uses an inline function that wraps bottom[0]->shape instead. (Note that that's now somewhat awkwardly stored as bottom_shape_ in order to get around the fact that bottom is neither a member variable nor argument to functions to such as compute_output_shape.)

Again, this should definitely be tested, but this PR is just the fix...

LayerSetUp

This also eliminates the extra copying of bottom's shape.
@shelhamer
Copy link
Member

This looks right to me but @jeffdonahue should check as the original author.

@jeffdonahue
Copy link
Contributor

Looks reasonable to me, but hard to know without any tests. Since this is a bugfix though, I think this can be merged given the existing tests pass and that you've successfully used this for reshaping in your work @longjon.

@longjon
Copy link
Contributor Author

longjon commented Sep 21, 2015

I'll go ahead and merge then since this passes the tests and a cursory check which the old code failed, but we should still fix up the tests so that this is checked more carefully.

longjon added a commit that referenced this pull request Sep 21, 2015
Fix broken conv/deconv reshaping
@longjon longjon merged commit d425e59 into BVLC:master Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants