Convenience function to run softmax and log-softmax test cases \param operatorCode tflite::BuiltinOperator_SOFTMAX or tflite::BuiltinOperator_LOG_SOFTMAX \param backends armnn backends to target \param beta multiplicative parameter to the softmax function \param expectedOutput to be checked against transformed input
| 139 | /// \param beta multiplicative parameter to the softmax function |
| 140 | /// \param expectedOutput to be checked against transformed input |
| 141 | void SoftmaxTestCase(tflite::BuiltinOperator operatorCode, float beta, |
| 142 | std::vector<float> expectedOutput, const std::vector<armnn::BackendId> backends = {}) |
| 143 | { |
| 144 | std::vector<float> input = { |
| 145 | 1.0, 2.5, 3.0, 4.5, 5.0, |
| 146 | -1.0, -2.5, -3.0, -4.5, -5.0}; |
| 147 | std::vector<int32_t> shape = {2, 5}; |
| 148 | |
| 149 | SoftmaxTest(operatorCode, |
| 150 | tflite::TensorType_FLOAT32, |
| 151 | shape, |
| 152 | input, |
| 153 | expectedOutput, |
| 154 | backends, |
| 155 | beta); |
| 156 | } |
| 157 | |
| 158 | } // anonymous namespace |
no test coverage detected