Conversation
…MaxPoolingLayer` * Pooling is now a subclass of Convolutional Layer. As a result common functions and fields are not replicated. * Constructor arguments that can be internally computed are eliminated.
…frame". This is important to have the same naming convention everywhere.
|
Can one of the admins verify this patch? |
Closed
steremma
added a commit
to steremma/root
that referenced
this pull request
Jun 28, 2018
lmoneta
pushed a commit
that referenced
this pull request
Jun 28, 2018
steremma
added a commit
to steremma/root
that referenced
this pull request
Jun 28, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API Redesign
Goal
The goal is this PR is to improve the API of the CNN layers (MaxPooling and Conv currently), by eliminating redundant constructor arguments and fields. By redundant in this context, I refer to arguments that can be directly computed from others, and fields that unnecesseraly exist in multiple classes.
Key points
Below some discussion points on design decisions I made, but still consider debatable.
Since my experience in production level C++ is very limited I highly value opinions from experienced colleagues and previous authors of the module.
Making
MaxPoolingLayera sub-class ofConvLayerEvery layer type in a convolutional network follows the logic existing in our
ConvLayer:A filter is sliding over the input and at each step applies an operation to the input elements within its receptive field to produce a single output element.
As we can see they all share the same logic and therefore fields.
Results
Common fields between the 2 layer types in the CNN module are now not duplicated (strides sizes, padding sizes, filter sizes). The same for the 4
protectedmethods inConvLayer.We now have a cleaner API, as the constructor arguments where reduced from 26 to 16 without any change in the functionality).