if (getNumberOfDimensions(_inputShape) == 2)
{
uint32_t batch_size = getSizeOfDimension(_inputShape, 0);
+ if (batch_size == 0)
+ throw std::runtime_error("batch_size should not be 0");
+
uint32_t input_size = getNumberOfElements(_inputShape) / batch_size;
Softmax(_inputData.f, input_size, batch_size, _beta, _outputData.f);
}
if (getNumberOfDimensions(_inputShape) == 2)
{
uint32_t batch_size = getSizeOfDimension(_inputShape, 0);
+ if (batch_size == 0)
+ throw std::runtime_error("batch_size should not be 0");
+
uint32_t input_size = getNumberOfElements(_inputShape) / batch_size;
shapeIn4D.dimensions = {batch_size, 1, 1, input_size};
}