-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Layer] Introduce upsample2d
layer
#2639
Conversation
📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2639. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/. |
cc. @kimhan0515, @Boseong-Seo |
b7090be
to
d1500f2
Compare
cibot: @heka1024, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nntrainer/ci/repo-workers/pr-checker/2639-202406180350590.31319904327393-d1500f25c6072ffdcba28bb6b7ebd7b501da1501/. |
There are some CI issues related about generating test data. But I already added testcase in |
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.
The file, upsample2d_2x2_nearest.nnlayergolden
doesn't exist.
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.
@heka1024, 💯 All CI checkers are successfully verified. Thanks.
@myungjoo I added golden layer files. Thank you. |
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.
LGTM. You did a great job.
nntrainer/layers/common_properties.h
Outdated
/** | ||
* @brief Upsampling operation type class | ||
*/ | ||
enum class Enum { nearest, bilinear }; |
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.
How about Interpolation
instead of Enum
for clarity?
enum class Enum { nearest, bilinear }; | |
enum class Interpolation { nearest, bilinear }; |
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.
@djeong20 To use EnumProperty<UpsampleModeInfo>
in class UpsampleMode
, we have to declare it as name Enum
in code as far as I knew.
If there is an alternative way, please let me know.
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.
How about utilizing using Enum
?
nntrainer/nntrainer/layers/common_properties.h
Lines 864 to 876 in 9e917a3
struct ActivationTypeInfo { | |
using Enum = nntrainer::ActivationType; | |
static constexpr std::initializer_list<Enum> EnumList = { | |
Enum::ACT_TANH, Enum::ACT_SIGMOID, Enum::ACT_RELU, | |
Enum::ACT_SOFTMAX, Enum::ACT_LEAKY_RELU, Enum::ACT_SWISH, | |
Enum::ACT_GELU, Enum::ACT_QUICK_GELU, Enum::ACT_NONE, | |
Enum::ACT_UNKNOWN}; | |
static constexpr const char *EnumStr[] = {"tanh", "sigmoid", "relu", | |
"softmax", "leaky_relu", "swish", | |
"gelu", "quick_gelu", "none", | |
"unknown"}; | |
}; |
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.
@djeong20 Thank you for comment. I made a change.
Add `upsample2d` layer in nntrainer. This could be used in YOLO or other layers. **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Co-authored-by: Boseong Seo <[email protected]> Co-authored-by: kimhan0515 <[email protected]> Signed-off-by: heka1024 <[email protected]>
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.
@heka1024, 💯 All CI checkers are successfully verified. Thanks.
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.
LGTM
Add
upsample2d
layer in nntrainer. This could be used in YOLO or other layers.Self evaluation: