-
Notifications
You must be signed in to change notification settings - Fork 191
Convolution transpose #1648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convolution transpose #1648
Conversation
e263a36 to
03dda9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple minor comments/questions.
|
Fixups added. I was thinking I'd squash all the convolution-related commits (so everything except the node init ordering and test_seeding), unless you think there are any that are important to keep separate? |
|
The fixups look good. Squashing all the convolution ones is fine by me. |
73b9ab1 to
3689657
Compare
|
@drasmuss Got this rebased onto master, and made the appropriate f-string changes (I didn't see any OrderedDicts or places for pathlib). I don't think all the fixups necessarily point to the right base commit, but if you're squashing together all the convolution stuff anyway it should be fine. |
|
I've fixed the alias problem in nengo/nengo-sphinx-theme#70. This now requires that. |
5388828 to
f9fa742
Compare
05676b4 to
788e607
Compare
|
This is ready for another look @drasmuss, when you get a chance. |
Otherwise, if `output` is initialized before `size_out`, a function `output` will be run unnecessarily to determine `size_out`.
db5c26e to
b2cd1af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, but this PR adds a lot of noise to the test suite that we can hopefully pare down before merging. Also, we've brought in TensorFlow as an optional test dependency, which isn't ideal, because we don't want to really want to mark it as an optional dependency because it doesn't do anything except for run tests, but we also don't want to mark it as a test dependency because it's a very big dependency that tests a small fraction of the codebase. Is there a simple-ish way to implement those tests without TensorFlow? If not, I think we will probably want to figure out some way to ensure that these tests run at least as part of the release process, as otherwise they won't get run regularly.
|
As for including TensorFlow, I'm happy to have that only run on release. I don't see a simple way to get around it; the whole point of vendorizing that |
|
Huh ... I'm not sure why exactly but this branch is causing the Appveyor build to run out of memory. Only for Python 3.6 though so ... not sure if it's worth debugging much. |
We also add the Conv and ConvTranspose aliases as they will be familiar to TensorFlow users. This commit also cleans up some of the original Convolution implementation, raises an exception when Convolution has empty output, and tests Convolution against TensorFlow.
41a52a0 to
7a08d8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the tests, made a story for running with TF on release, and cleaned up the history. I'll merge on successful CI.
Motivation and context:
Transpose convolution is a fairly general way to do different types of upsampling in deep networks. Adding this transform allows many more types of deep networks to be implemented in Nengo, including many types of object detection networks.
How has this been tested?
I added a test that ensures that the
ConvTransposeIncop is the transpose ofConvInc. SinceConvIncis tested against the Scipy implementation, if all tests pass thenConvTransposeInc(and the underlying code we've borrowed fromnp-conv2d) should be working fine. I've also added tests for the API (mostly piggy-backing off the existingConvolutiontest).How long should this take to review?
Where should a reviewer start?
Start with the
ConvolutionTransposetransform, since this is the API (it's fairly similar to theConvolutiontransform). Then, the new test inbuilder/tests/test_transforms.pyis the main test that's added to test the underlying implementation. The code in_vendors/np-conv2dis copied from np-conv2d, with the modifications listed in theconv2d_gradxdocstring.Types of changes:
Checklist:
Still to do: