diff options
author | Kevin Cheng <kevin.cheng@arm.com> | 2021-09-28 15:48:27 -0700 |
---|---|---|
committer | Kevin Cheng <kevin.cheng@arm.com> | 2021-09-28 15:48:27 -0700 |
commit | 269e898e23cfb4acb337beb5385620ac5afd9df8 (patch) | |
tree | bdf4939230de4982d4630b16b94365f928278290 /reference_model/src/ops/activation_funcs.cc | |
parent | c42addcee5240d9a0846d3f7e8cb5f88c80e2975 (diff) | |
download | reference_model-269e898e23cfb4acb337beb5385620ac5afd9df8.tar.gz |
Remove ReluN op.
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: Iaac727159a84de1f83de549c3a22704096f46bf9
Diffstat (limited to 'reference_model/src/ops/activation_funcs.cc')
-rw-r--r-- | reference_model/src/ops/activation_funcs.cc | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/reference_model/src/ops/activation_funcs.cc b/reference_model/src/ops/activation_funcs.cc index 440f4e1..21677d5 100644 --- a/reference_model/src/ops/activation_funcs.cc +++ b/reference_model/src/ops/activation_funcs.cc @@ -51,31 +51,6 @@ int OpClamp<Rank, Dtype>::register_fcn() } template <int Rank, DType Dtype> -int OpReluN<Rank, Dtype>::register_fcn() -{ - - switch (Dtype) - { - case DType_FLOAT: - { - InEigenType N = (InEigenType)attribute->max_fp(); - this->fcn = [N](InEigenType a) -> OutEigenType { return a >= 0 ? (a <= N ? a : N) : 0; }; - } - break; - case DType_INT32: - { - InEigenType N = (InEigenType)attribute->max_int(); - this->fcn = [N](InEigenType a) -> OutEigenType { return a >= 0 ? (a <= N ? a : N) : 0; }; - } - break; - default: - ERROR_IF(true, "unsupported DType %s", EnumNamesDType()[Dtype]); - } - - return 0; -} - -template <int Rank, DType Dtype> int OpSigmoid<Rank, Dtype>::register_fcn() { switch (Dtype) @@ -110,9 +85,6 @@ DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpClamp, FLOAT); DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpClamp, INT8); DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpClamp, INT16); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpReluN, FLOAT); -DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpReluN, INT32); - DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpSigmoid, FLOAT); DEF_INSTANTIATE_RANK0_6_ONE_RANK_ONE_TYPE(OpTanh, FLOAT); |