Squeeze will handle 1x1x1x1 input using ShapeFixer.
Scalar output will be fixed to rank-1 one element tensor.
The output value will be transfer to app without trouble since nnfw
runtime API get output values using buffer pointer and buffer length.
Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
void ShapeFixer::visit(const model::operation::SqueezeNode &node)
{
const auto output_index{node.getOutputs().at(0)};
+ if (_ctx.at(output_index).shape().rank() == 0)
+ const_cast<::neurun::model::Shape &>(_ctx.at(output_index).shape()).extendRank(1);
const auto input_index{node.getInputs().at(model::operation::SqueezeNode::Input::INPUT)};
_tensor_builder->dimCorrection(input_index, false);
_tensor_builder->dimCorrection(output_index, false);