aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Types.h
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2018-02-07 15:38:12 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:47:18 +0000
commit1167487ea8e54a76d0a3625e0aa84e2ad9ffd317 (patch)
tree287dbc45e895c6b637fecc692c04bd4ae59580ae /arm_compute/core/Types.h
parent4e1e7dcd581adecd5ad9c0f9503fc3c43f8222ef (diff)
downloadComputeLibrary-1167487ea8e54a76d0a3625e0aa84e2ad9ffd317.tar.gz
COMPMID-897 Merge batch normalization with bounded relu
Change-Id: I9a607fe620f795cdea1a99fdd3f5f8c2fc76f980 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/119234 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/Types.h')
-rw-r--r--arm_compute/core/Types.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index 5a08ac9153..3affe7e8ec 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -713,6 +713,7 @@ public:
LINEAR /**< Linear ( \f$ f(x)= ax + b \f$ ) */
};
+ ActivationLayerInfo() = default;
/** Default Constructor
*
* @param[in] f The activation function to use.
@@ -721,7 +722,7 @@ public:
* @param[in] b (Optional) The beta parameter used by some activation functions (@ref ActivationFunction::LINEAR, @ref ActivationFunction::LU_BOUNDED_RELU, @ref ActivationFunction::TANH).
*/
ActivationLayerInfo(ActivationFunction f, float a = 0.0f, float b = 0.0f)
- : _act(f), _a(a), _b(b)
+ : _act(f), _a(a), _b(b), _enabled(true)
{
}
ActivationFunction activation() const
@@ -736,11 +737,16 @@ public:
{
return _b;
}
+ bool enabled() const
+ {
+ return _enabled;
+ }
private:
- ActivationFunction _act;
- float _a;
- float _b;
+ ActivationFunction _act = { ActivationLayerInfo::ActivationFunction::LOGISTIC };
+ float _a = {};
+ float _b = {};
+ bool _enabled = { false };
};
/** Normalization Layer Information class */