| 30 | namespace assembly_utils |
| 31 | { |
| 32 | arm_gemm::Activation map_to_arm_gemm_activation(const ActivationLayerInfo &act) |
| 33 | { |
| 34 | arm_gemm::Activation gemm_act; |
| 35 | |
| 36 | // Early exit in case lower bound is other than 0, as it's not yet supported |
| 37 | if (act.b() != 0.f) |
| 38 | { |
| 39 | return gemm_act; |
| 40 | } |
| 41 | |
| 42 | switch (act.activation()) |
| 43 | { |
| 44 | case ActivationLayerInfo::ActivationFunction::RELU: |
| 45 | gemm_act.type = arm_gemm::Activation::Type::ReLU; |
| 46 | break; |
| 47 | case ActivationLayerInfo::ActivationFunction::BOUNDED_RELU: |
| 48 | gemm_act.type = arm_gemm::Activation::Type::BoundedReLU; |
| 49 | gemm_act.param1 = act.a(); |
| 50 | gemm_act.param2 = 0.f; |
| 51 | break; |
| 52 | case ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU: |
| 53 | gemm_act.type = arm_gemm::Activation::Type::BoundedReLU; |
| 54 | gemm_act.param1 = act.a(); |
| 55 | gemm_act.param2 = act.b(); |
| 56 | break; |
| 57 | default: |
| 58 | gemm_act.type = arm_gemm::Activation::Type::None; |
| 59 | } |
| 60 | |
| 61 | return gemm_act; |
| 62 | } |
| 63 | |
| 64 | arm_conv::PaddingValues map_to_arm_conv_padding(const PadStrideInfo &pad_stride_info) |
| 65 | { |
no test coverage detected