blob: b26dd9efad01527722c0458471d7de06eb46d035 [file] [log] [blame]
// clang-format off
// Generated file (from: quantized_lstm.mod.py). Do not edit
// Create the model
Model createTestModel() {
const std::vector<Operand> operands = {
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 2},
.numberOfConsumers = 1,
.scale = 0.0078125f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 4},
.numberOfConsumers = 1,
.scale = 0.0078125f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {16, 6},
.numberOfConsumers = 1,
.scale = 0.00408021f,
.zeroPoint = 100,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_INT32,
.dimensions = {16},
.numberOfConsumers = 1,
.scale = 3.1876640625e-05f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT16_SYMM,
.dimensions = {2, 4},
.numberOfConsumers = 1,
.scale = 0.00048828125f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_INPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT16_SYMM,
.dimensions = {2, 4},
.numberOfConsumers = 0,
.scale = 0.00048828125f,
.zeroPoint = 0,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
},
{
.type = OperandType::TENSOR_QUANT8_ASYMM,
.dimensions = {2, 4},
.numberOfConsumers = 0,
.scale = 0.0078125f,
.zeroPoint = 128,
.lifetime = OperandLifeTime::MODEL_OUTPUT,
.location = {.poolIndex = 0, .offset = 0, .length = 0},
}
};
const std::vector<Operation> operations = {
{
.type = OperationType::QUANTIZED_16BIT_LSTM,
.inputs = {0, 1, 2, 3, 4},
.outputs = {5, 6},
}
};
const std::vector<uint32_t> inputIndexes = {0, 1, 2, 3, 4};
const std::vector<uint32_t> outputIndexes = {5, 6};
std::vector<uint8_t> operandValues = {};
const std::vector<hidl_memory> pools = {};
return {
.operands = operands,
.operations = operations,
.inputIndexes = inputIndexes,
.outputIndexes = outputIndexes,
.operandValues = operandValues,
.pools = pools,
};
}
inline bool is_ignored(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}