ANeuralNetworksExecution::getInputOperandIndex(uint32_t index) noexcept
{
neurun::model::operand::IO::Index input_index{index};
- const auto operand_index = _executor->plan().model().getInputs().at(input_index);
+ const auto operand_index = _model.getInputs().at(input_index);
return operand_index;
}
const neurun::model::operand::Index
ANeuralNetworksExecution::getOutputOperandIndex(uint32_t index) noexcept
{
neurun::model::operand::IO::Index output_index{index};
- const auto operand_index = _executor->plan().model().getInputs().at(output_index);
+ const auto operand_index = _model.getInputs().at(output_index);
return operand_index;
}
bool ANeuralNetworksExecution::compareDataType(const ANeuralNetworksOperandType *type,
const neurun::model::operand::Index index) noexcept
{
- const auto operand_type = _executor->plan().model().operands().at(index).typeInfo();
+ const auto operand_type = _model.operands().at(index).typeInfo();
const auto typeInfo = ::neurun::util::getTypeInfo(type);
if (operand_type != typeInfo)
bool ANeuralNetworksExecution::compareShape(const ANeuralNetworksOperandType *type,
const neurun::model::operand::Index index) noexcept
{
- const auto operand_shape = _executor->plan().model().operands().at(index).shape();
+ const auto operand_shape = _model.operands().at(index).shape();
const auto shape_from_type = ::neurun::util::getShape(type);
// Passed shape should be specified
bool ANeuralNetworksExecution::haveUnspecifiedDims(
const neurun::model::operand::Index index) noexcept
{
- const auto operand_shape = _executor->plan().model().operands().at(index).shape();
+ const auto operand_shape = _model.operands().at(index).shape();
return ((operand_shape.element_nums() == 0) ? true : false);
}
{
neurun::model::operand::IO::Index input_index{index};
const auto operand_index = getInputOperandIndex(index);
- const auto type_info = _executor->plan().model().operands().at(operand_index).typeInfo();
- const auto shape = _executor->plan().model().operands().at(operand_index).shape();
+ const auto type_info = _model.operands().at(operand_index).typeInfo();
+ const auto shape = _model.operands().at(operand_index).shape();
_executor->setInput(input_index, type_info, shape, buffer, length);
}
{
neurun::model::operand::IO::Index output_index{index};
const auto operand_index = getOutputOperandIndex(index);
- const auto type_info = _executor->plan().model().operands().at(operand_index).typeInfo();
- const auto shape = _executor->plan().model().operands().at(operand_index).shape();
+ const auto type_info = _model.operands().at(operand_index).typeInfo();
+ const auto shape = _model.operands().at(operand_index).shape();
_executor->setOutput(output_index, type_info, shape, buffer, length);
}