aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/TypesUtils.hpp
diff options
context:
space:
mode:
authorsurmeh01 <surabhi.mehta@arm.com>2018-03-29 16:29:27 +0100
committersurmeh01 <surabhi.mehta@arm.com>2018-03-29 16:29:27 +0100
commitbceff2fb3fc68bb0aa88b886900c34b77340c826 (patch)
treed867d3e090d58d3012dfbbac456e9ea8c7f789bc /include/armnn/TypesUtils.hpp
parent4fcda0101ec3d110c1d6d7bee5c83416b645528a (diff)
downloadarmnn-bceff2fb3fc68bb0aa88b886900c34b77340c826.tar.gz
Release 18.03
Diffstat (limited to 'include/armnn/TypesUtils.hpp')
-rw-r--r--include/armnn/TypesUtils.hpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/armnn/TypesUtils.hpp b/include/armnn/TypesUtils.hpp
index a851b66b28..ba18e0045b 100644
--- a/include/armnn/TypesUtils.hpp
+++ b/include/armnn/TypesUtils.hpp
@@ -34,6 +34,56 @@ constexpr char const* GetComputeDeviceAsCString(Compute compute)
}
}
+constexpr char const* GetActivationFunctionAsCString(ActivationFunction activation)
+{
+ switch (activation)
+ {
+ case ActivationFunction::Sigmoid: return "Sigmoid";
+ case ActivationFunction::TanH: return "TanH";
+ case ActivationFunction::Linear: return "Linear";
+ case ActivationFunction::ReLu: return "ReLu";
+ case ActivationFunction::BoundedReLu: return "BoundedReLu";
+ case ActivationFunction::SoftReLu: return "SoftReLu";
+ case ActivationFunction::LeakyReLu: return "LeakyReLu";
+ case ActivationFunction::Abs: return "Abs";
+ case ActivationFunction::Sqrt: return "Sqrt";
+ case ActivationFunction::Square: return "Square";
+ default: return "Unknown";
+ }
+}
+
+constexpr char const* GetPoolingAlgorithmAsCString(PoolingAlgorithm pooling)
+{
+ switch (pooling)
+ {
+ case PoolingAlgorithm::Average: return "Average";
+ case PoolingAlgorithm::Max: return "Max";
+ case PoolingAlgorithm::L2: return "L2";
+ default: return "Unknown";
+ }
+}
+
+constexpr char const* GetOutputShapeRoundingAsCString(OutputShapeRounding rounding)
+{
+ switch (rounding)
+ {
+ case OutputShapeRounding::Ceiling: return "Ceiling";
+ case OutputShapeRounding::Floor: return "Floor";
+ default: return "Unknown";
+ }
+}
+
+
+constexpr char const* GetPaddingMethodAsCString(PaddingMethod method)
+{
+ switch (method)
+ {
+ case PaddingMethod::Exclude: return "Exclude";
+ case PaddingMethod::IgnoreValue: return "IgnoreValue";
+ default: return "Unknown";
+ }
+}
+
constexpr unsigned int GetDataTypeSize(DataType dataType)
{
switch (dataType)