Skip to content

Commit

Permalink
[Layer] Add missing activation types
Browse files Browse the repository at this point in the history
Some activation types were missing from EnumList.
Added missing types to EnumList.

Changed the order of ActivationType and EnumList to be the same.

**Self evaluation:**
1. Build test:	 [X]Passed [ ]Failed [ ]Skipped
2. Run test:	 [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: SeoHyungjun <[email protected]>
  • Loading branch information
SeoHyungjun committed Jul 3, 2024
1 parent c957d13 commit 991bda5
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions nntrainer/layers/common_properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -865,15 +865,17 @@ class LabelLayer : public Name {
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_TANH_GELU, Enum::ACT_SIGMOID_GELU,
Enum::ACT_NONE, Enum::ACT_UNKNOWN};

static constexpr const char *EnumStr[] = {"tanh", "sigmoid", "relu",
"softmax", "leaky_relu", "swish",
"gelu", "tanh_gelu", "sigmoid_gelu",
"none", "unknown"};
Enum::ACT_TANH, Enum::ACT_SIGMOID, Enum::ACT_RELU,
Enum::ACT_SWISH, Enum::ACT_GELU, Enum::ACT_TANH_GELU,
Enum::ACT_SIGMOID_GELU, Enum::ACT_SOFTMAX, Enum::ACT_SOFTPLUS,
Enum::ACT_LEAKY_RELU, Enum::ACT_ELU, Enum::ACT_SELU,
Enum::ACT_MISH, Enum::ACT_NONE, Enum::ACT_UNKNOWN};

static constexpr const char *EnumStr[] = {"tanh", "sigmoid", "relu",
"swish", "gelu", "tanh_gelu",
"sigmoid_gelu", "softmax", "softplus",
"leaky_relu", "elu", "selu",
"mish", "none", "unknown"};
};

/**
Expand Down

0 comments on commit 991bda5

Please sign in to comment.