{
neurun::model::IOIndex input_index{index};
const auto operand_index = getInputOperandIndex(index);
- bool unspecified = haveUnspecifiedDims(operand_index);
const auto type_info = _execution->model().operands.at(operand_index).typeInfo();
- const auto shape = (unspecified ? NNAPIConvert::getShape(type)
- : _execution->model().operands.at(operand_index).shape());
+ const auto shape = ((type != nullptr) ? NNAPIConvert::getShape(type)
+ : _execution->model().operands.at(operand_index).shape());
_execution->setInput(input_index, type_info, shape, buffer, length);
}
{
neurun::model::IOIndex output_index{index};
const auto operand_index = getOutputOperandIndex(index);
- bool unspecified = haveUnspecifiedDims(operand_index);
const auto type_info = _execution->model().operands.at(operand_index).typeInfo();
- const auto shape = (unspecified ? NNAPIConvert::getShape(type)
- : _execution->model().operands.at(operand_index).shape());
+ const auto shape = ((type != nullptr) ? NNAPIConvert::getShape(type)
+ : _execution->model().operands.at(operand_index).shape());
_execution->setOutput(output_index, type_info, shape, buffer, length);
}