-
-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
901: Add option for "Same" padding to conv and pooling layers r=dhairyagandhi96 a=DrChainsaw Fixes #813 This adds the possibility to set "pad=SamePad()" to automatically calculate the amount of padding to apply so that outputsize==inputsize (assuming stide == 1). Comments on API more than welcome. I considered the following options: * Call the type just Same and export it, but I was afraid to cause name collisions due to a too generic name * Call the type Same and not export it * Dispatch on type instead of instance (so that one can type pad=Same instead of pad=Same()) * Supply a method instead of a type, giving a similar API as above. Happy to change to any of the above or to anything else. I don't think that same padding is common for pooling layers, but I added it just for the sake of consistency. It is a separate commit so it can easily be removed if not wanted. Co-authored-by: DrChainsaw <Christian.kyril.skarby@gmail.com>
- Loading branch information
Showing
4 changed files
with
70 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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