48 throw std::runtime_error(
"batch_size should not be 0");
57 op_params.
beta = _beta;
64 op_params.
beta = _beta;
77 op_params.
table = _table;
79#ifdef TFLITE_SOFTMAX_USE_UINT16_LUT
98#ifdef TFLITE_SOFTMAX_USE_UINT16_LUT
101 nnfw::cker::PopulateSoftmaxUInt8LookupTable(_uint8_table1, _uint8_table2,
_input->
data_scale(),
113 case OperandType::FLOAT32:
116 case OperandType::QUANT_UINT8_ASYMM:
117 softmaxQuant8<uint8_t>();
119 case OperandType::QUANT_INT8_ASYMM:
120 softmaxQuant8<int8_t>();
123 throw std::runtime_error{
"SoftMax: unsupported data type"};
A tensor class that is portable for other backends.
float data_scale() const override final
int32_t data_zero_point() const override final
ir::DataType data_type() const override final
void configure(const IPortableTensor *input, const float beta, IPortableTensor *output)
const IPortableTensor * _input
IPortableTensor * _output
uint32_t getNumberOfElements(const Shape &shape)
uint32_t getSizeOfDimension(const Shape &shape, uint32_t dimensionIdx)
uint32_t getNumberOfDimensions(const Shape &shape)
void Softmax(const SoftmaxParams ¶ms, const Shape &input_shape, const float *input_data, const Shape &output_shape, float *output_data)
void Softmax(const float *in, const int input_size, const int batch_size, const float beta, float *out)
void PopulateSoftmaxLookupTable(float *table, float input_scale, float beta)
nnfw::cker::Shape getShape(const IPortableTensor *tensor)