MCPcopy Create free account
hub / github.com/ARM-software/armnn / SoftmaxTestCase

Function SoftmaxTestCase

delegate/test/SoftmaxTestHelper.hpp:141–156  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

139/// \param beta multiplicative parameter to the softmax function
140/// \param expectedOutput to be checked against transformed input
141void 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

Callers 2

SoftmaxTest.cppFile · 0.85

Calls 1

SoftmaxTestFunction · 0.85

Tested by

no test coverage detected