| 440 | } |
| 441 | |
| 442 | std::pair<int32_t, int32_t> get_quantized_activation_min_max(const ActivationLayerInfo &act_info, |
| 443 | DataType data_type, |
| 444 | UniformQuantizationInfo oq_info) |
| 445 | { |
| 446 | const bool is_qasymm8_signed = is_data_type_quantized_asymmetric_signed(data_type); |
| 447 | const auto a = act_info.a(); |
| 448 | const auto b = act_info.b(); |
| 449 | const int a_int = is_qasymm8_signed ? quantize_qasymm8_signed(a, oq_info) : quantize_qasymm8(a, oq_info); |
| 450 | const int b_int = is_qasymm8_signed ? quantize_qasymm8_signed(b, oq_info) : quantize_qasymm8(b, oq_info); |
| 451 | const auto type_max_value = std::get<1>(get_min_max(data_type)).get<int32_t>(); |
| 452 | |
| 453 | const int32_t min_activation = act_info.activation() != ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU |
| 454 | ? std::min(oq_info.offset, type_max_value) |
| 455 | : b_int; |
| 456 | const int32_t max_activation = |
| 457 | act_info.activation() == ActivationLayerInfo::ActivationFunction::RELU ? type_max_value : a_int; |
| 458 | |
| 459 | return std::make_pair(min_activation, max_activation); |
| 460 | } |
| 461 | |
| 462 | std::unordered_map<const ITensorInfo *, PaddingSize> get_padding_info(std::initializer_list<const ITensor *> tensors) |
| 463 | { |
no test coverage detected