Conversation
kartikdutt18
left a comment
There was a problem hiding this comment.
Nice, I think this looks okay. I will take a closer look tomorrow.
src/mlpack/methods/ann/activation_functions/hardshrink_function.hpp
Outdated
Show resolved
Hide resolved
|
Hi @zoq I have also tried to keep this up to the format that you had asked me for my previous pr. |
If you can implement the function in the form of another layer, that would be great. https://github.com/mlpack/mlpack/blob/master/src/mlpack/methods/ann/layer/elu.hpp is one example. |
|
XD Forgot to push the code. Doing it now. |
|
No worries. |
kartikdutt18
left a comment
There was a problem hiding this comment.
Hi @ojhalakshya, thanks for all the work, I have left some comments, other than that I think it's fine. Thanks.
zoq
left a comment
There was a problem hiding this comment.
If you can fix the minor issue, it's ready from my side.
| /** | ||
| * Create HardShrink object using specified hyperparameter lambda. | ||
| * | ||
| * @param lambda is calculated by multiplying the |
There was a problem hiding this comment.
Picky style comment, the first word after the parameter should use upper casing.
There was a problem hiding this comment.
* @param lambda Is calculated by multiplying the
Is this the correct way to do so?
There was a problem hiding this comment.
Thanks for the quick reply.
I have done the changes as above.
|
Also, let's wait for the test results before we merge this in, just to make sure we didn't miss anything. |
|
@zoq |
|
@zoq |
|
Hello there! Thanks for your contribution. I see that this is your first contribution to mlpack. If you'd like to add your name to the list of contributors in In addition, if you'd like some stickers to put on your laptop, I'd be happy to help get them in the mail for you. Just send an email with your physical mailing address to stickers@mlpack.org, and then one of the mlpack maintainers will put some stickers in an envelope for you. It may take a few weeks to get them, depending on your location. 👍 |
|
@ojhalakshya does everything look to merge, or do you want to make any more revisions? |
The appveyor timed-out, it's not related with the changes from the PR, so save to ignore. |
|
@ojhalakshya, Thanks for the changes. This looks fine to me too. 👍 |
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> dummy commit Redirected link on NUMfocus logo test bugs fixing rebasing branch
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> dummy commit Redirected link on NUMfocus logo test bugs fixing rebasing branch
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> dummy commit Redirected link on NUMfocus logo test bugs fixing rebasing branch
* completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> dummy commit Redirected link on NUMfocus logo test bugs fixing rebasing branch dummy commit dummy commit 2
* Adding hard shrink function (#2186) * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> * completed hardshrink_function.hpp * resetting master * complete hardsrhink_function.hpp * activation_functions_test.cpp * cmake changes * base layer changes * style correction * starting implementing hard shrink as layer * new changes * changes in tests * inv changes * test changes * test changes * deleting prev function * test style changes * more style changes * comment changes * minor changes * comment corrections hard shrink * minor changes * dummy commit * Style fix for parameter lambda * hardshrink.hpp to hardshrink_impl.hpp fn function shift * style fix Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de> dummy commit Redirected link on NUMfocus logo test bugs fixing rebasing branch * rvalue refactor corrections edited copyright.txt changes in History.md bug fix * bug fixes minor change * dummy commit * style fix
Hi, everyone I wanted to add the Hard Shrink Activation Function.
It can be refrenced from pytorch.
Just to mention ideal soft shrinkage has
lower minmax bound risk for small n but ideal hard shrinkage has lower minmax bound risk for large n.