blob: 15da00960c33665230fbaa8afe1120ce2544cb76 [file] [log] [blame]
// Generated from transpose_conv2d.mod.py
// DO NOT EDIT
// clang-format off
#include "TestGenerated.h"
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy = model->addOperand(&type9);
auto param63 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy_init[] = {0.0f};
model->setOperandValue(dummy, dummy_init, sizeof(float) * 1);
static int32_t param63_init[] = {0};
model->setOperandValue(param63, param63_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy, param63}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy1 = model->addOperand(&type9);
auto param64 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy1_init[] = {0.0f};
model->setOperandValue(dummy1, dummy1_init, sizeof(float) * 1);
static int32_t param64_init[] = {0};
model->setOperandValue(param64, param64_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy1, param64}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy2 = model->addOperand(&type9);
auto param65 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy3 = model->addOperand(&type9);
auto param66 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy4 = model->addOperand(&type9);
auto param67 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy2_init[] = {0.0f};
model->setOperandValue(dummy2, dummy2_init, sizeof(float) * 1);
static int32_t param65_init[] = {0};
model->setOperandValue(param65, param65_init, sizeof(int32_t) * 1);
static float dummy3_init[] = {0.0f};
model->setOperandValue(dummy3, dummy3_init, sizeof(float) * 1);
static int32_t param66_init[] = {0};
model->setOperandValue(param66, param66_init, sizeof(int32_t) * 1);
static float dummy4_init[] = {0.0f};
model->setOperandValue(dummy4, dummy4_init, sizeof(float) * 1);
static int32_t param67_init[] = {0};
model->setOperandValue(param67, param67_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy2, param65}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy3, param66}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy4, param67}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy5 = model->addOperand(&type9);
auto param68 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy6 = model->addOperand(&type9);
auto param69 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy7 = model->addOperand(&type9);
auto param70 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy5_init[] = {0.0f};
model->setOperandValue(dummy5, dummy5_init, sizeof(float) * 1);
static int32_t param68_init[] = {0};
model->setOperandValue(param68, param68_init, sizeof(int32_t) * 1);
static float dummy6_init[] = {0.0f};
model->setOperandValue(dummy6, dummy6_init, sizeof(float) * 1);
static int32_t param69_init[] = {0};
model->setOperandValue(param69, param69_init, sizeof(int32_t) * 1);
static float dummy7_init[] = {0.0f};
model->setOperandValue(dummy7, dummy7_init, sizeof(float) * 1);
static int32_t param70_init[] = {0};
model->setOperandValue(param70, param70_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy5, param68}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy6, param69}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy7, param70}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_none_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_none_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy8 = model->addOperand(&type9);
auto param71 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy8_init[] = {0.0f};
model->setOperandValue(dummy8, dummy8_init, sizeof(float) * 1);
static int32_t param71_init[] = {0};
model->setOperandValue(param71, param71_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy8, param71}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_none_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy9 = model->addOperand(&type9);
auto param72 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy9_init[] = {0.0f};
model->setOperandValue(dummy9, dummy9_init, sizeof(float) * 1);
static int32_t param72_init[] = {0};
model->setOperandValue(param72, param72_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy9, param72}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_none_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_none_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_none_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy10 = model->addOperand(&type9);
auto param73 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy11 = model->addOperand(&type9);
auto param74 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy12 = model->addOperand(&type9);
auto param75 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy10_init[] = {0.0f};
model->setOperandValue(dummy10, dummy10_init, sizeof(float) * 1);
static int32_t param73_init[] = {0};
model->setOperandValue(param73, param73_init, sizeof(int32_t) * 1);
static float dummy11_init[] = {0.0f};
model->setOperandValue(dummy11, dummy11_init, sizeof(float) * 1);
static int32_t param74_init[] = {0};
model->setOperandValue(param74, param74_init, sizeof(int32_t) * 1);
static float dummy12_init[] = {0.0f};
model->setOperandValue(dummy12, dummy12_init, sizeof(float) * 1);
static int32_t param75_init[] = {0};
model->setOperandValue(param75, param75_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy10, param73}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy11, param74}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy12, param75}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_none_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy13 = model->addOperand(&type9);
auto param76 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy14 = model->addOperand(&type9);
auto param77 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy15 = model->addOperand(&type9);
auto param78 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy13_init[] = {0.0f};
model->setOperandValue(dummy13, dummy13_init, sizeof(float) * 1);
static int32_t param76_init[] = {0};
model->setOperandValue(param76, param76_init, sizeof(int32_t) * 1);
static float dummy14_init[] = {0.0f};
model->setOperandValue(dummy14, dummy14_init, sizeof(float) * 1);
static int32_t param77_init[] = {0};
model->setOperandValue(param77, param77_init, sizeof(int32_t) * 1);
static float dummy15_init[] = {0.0f};
model->setOperandValue(dummy15, dummy15_init, sizeof(float) * 1);
static int32_t param78_init[] = {0};
model->setOperandValue(param78, param78_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy13, param76}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy14, param77}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy15, param78}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_none_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
auto op1_tmp = model->addOperand(&type28);
auto dummy16 = model->addOperand(&type33);
auto param79 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy16_init[] = {0};
model->setOperandValue(dummy16, dummy16_init, sizeof(uint8_t) * 1);
static int32_t param79_init[] = {0};
model->setOperandValue(param79, param79_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy16, param79}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type28);
auto dummy17 = model->addOperand(&type33);
auto param80 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy17_init[] = {0};
model->setOperandValue(dummy17, dummy17_init, sizeof(uint8_t) * 1);
static int32_t param80_init[] = {0};
model->setOperandValue(param80, param80_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy17, param80}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
auto op1_tmp = model->addOperand(&type28);
auto dummy18 = model->addOperand(&type33);
auto param81 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy19 = model->addOperand(&type33);
auto param82 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy18_init[] = {0};
model->setOperandValue(dummy18, dummy18_init, sizeof(uint8_t) * 1);
static int32_t param81_init[] = {0};
model->setOperandValue(param81, param81_init, sizeof(int32_t) * 1);
static uint8_t dummy19_init[] = {0};
model->setOperandValue(dummy19, dummy19_init, sizeof(uint8_t) * 1);
static int32_t param82_init[] = {0};
model->setOperandValue(param82, param82_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy18, param81}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy19, param82}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type28);
auto dummy20 = model->addOperand(&type33);
auto param83 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy21 = model->addOperand(&type33);
auto param84 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy20_init[] = {0};
model->setOperandValue(dummy20, dummy20_init, sizeof(uint8_t) * 1);
static int32_t param83_init[] = {0};
model->setOperandValue(param83, param83_init, sizeof(int32_t) * 1);
static uint8_t dummy21_init[] = {0};
model->setOperandValue(dummy21, dummy21_init, sizeof(uint8_t) * 1);
static int32_t param84_init[] = {0};
model->setOperandValue(param84, param84_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy20, param83}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy21, param84}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type34);
auto dummy22 = model->addOperand(&type38);
auto param85 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy22_init[] = {100};
model->setOperandValue(dummy22, dummy22_init, sizeof(uint8_t) * 1);
static int32_t param85_init[] = {0};
model->setOperandValue(param85, param85_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy22, param85}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type34);
auto dummy23 = model->addOperand(&type38);
auto param86 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy23_init[] = {100};
model->setOperandValue(dummy23, dummy23_init, sizeof(uint8_t) * 1);
static int32_t param86_init[] = {0};
model->setOperandValue(param86, param86_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy23, param86}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type34);
auto dummy24 = model->addOperand(&type38);
auto param87 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy25 = model->addOperand(&type39);
auto param88 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy24_init[] = {100};
model->setOperandValue(dummy24, dummy24_init, sizeof(uint8_t) * 1);
static int32_t param87_init[] = {0};
model->setOperandValue(param87, param87_init, sizeof(int32_t) * 1);
static uint8_t dummy25_init[] = {128};
model->setOperandValue(dummy25, dummy25_init, sizeof(uint8_t) * 1);
static int32_t param88_init[] = {0};
model->setOperandValue(param88, param88_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy24, param87}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy25, param88}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type34);
auto dummy26 = model->addOperand(&type38);
auto param89 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy27 = model->addOperand(&type39);
auto param90 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy26_init[] = {100};
model->setOperandValue(dummy26, dummy26_init, sizeof(uint8_t) * 1);
static int32_t param89_init[] = {0};
model->setOperandValue(param89, param89_init, sizeof(int32_t) * 1);
static uint8_t dummy27_init[] = {128};
model->setOperandValue(dummy27, dummy27_init, sizeof(uint8_t) * 1);
static int32_t param90_init[] = {0};
model->setOperandValue(param90, param90_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy26, param89}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy27, param90}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
auto op1_tmp = model->addOperand(&type40);
auto dummy28 = model->addOperand(&type45);
auto param91 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy28_init[] = {100};
model->setOperandValue(dummy28, dummy28_init, sizeof(uint8_t) * 1);
static int32_t param91_init[] = {0};
model->setOperandValue(param91, param91_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy28, param91}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type40);
auto dummy29 = model->addOperand(&type45);
auto param92 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy29_init[] = {100};
model->setOperandValue(dummy29, dummy29_init, sizeof(uint8_t) * 1);
static int32_t param92_init[] = {0};
model->setOperandValue(param92, param92_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy29, param92}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type46(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type47(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type46);
auto op3 = model->addOperand(&type47);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type48(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type49(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type48);
auto op3 = model->addOperand(&type49);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type50(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type51(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type50);
auto op3 = model->addOperand(&type51);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
auto op1_tmp = model->addOperand(&type40);
auto dummy30 = model->addOperand(&type45);
auto param93 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy30_init[] = {100};
model->setOperandValue(dummy30, dummy30_init, sizeof(uint8_t) * 1);
static int32_t param93_init[] = {0};
model->setOperandValue(param93, param93_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy30, param93}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type52(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type53(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type52);
auto op3 = model->addOperand(&type53);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type40);
auto dummy31 = model->addOperand(&type45);
auto param94 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy31_init[] = {100};
model->setOperandValue(dummy31, dummy31_init, sizeof(uint8_t) * 1);
static int32_t param94_init[] = {0};
model->setOperandValue(param94, param94_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy31, param94}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type40);
auto dummy32 = model->addOperand(&type45);
auto param95 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy32_init[] = {100};
model->setOperandValue(dummy32, dummy32_init, sizeof(uint8_t) * 1);
static int32_t param95_init[] = {0};
model->setOperandValue(param95, param95_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy32, param95}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type40);
auto dummy33 = model->addOperand(&type45);
auto param96 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy33_init[] = {100};
model->setOperandValue(dummy33, dummy33_init, sizeof(uint8_t) * 1);
static int32_t param96_init[] = {0};
model->setOperandValue(param96, param96_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy33, param96}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type56(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type57(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type56);
auto op3 = model->addOperand(&type57);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type58(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type59(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type58);
auto op3 = model->addOperand(&type59);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type60(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type61(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type60);
auto op3 = model->addOperand(&type61);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type40);
auto dummy34 = model->addOperand(&type45);
auto param97 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy34_init[] = {100};
model->setOperandValue(dummy34, dummy34_init, sizeof(uint8_t) * 1);
static int32_t param97_init[] = {0};
model->setOperandValue(param97, param97_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy34, param97}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type62(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type63(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type62);
auto op3 = model->addOperand(&type63);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type40);
auto dummy35 = model->addOperand(&type45);
auto param98 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy35_init[] = {100};
model->setOperandValue(dummy35, dummy35_init, sizeof(uint8_t) * 1);
static int32_t param98_init[] = {0};
model->setOperandValue(param98, param98_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy35, param98}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
auto op1_tmp = model->addOperand(&type69);
auto dummy36 = model->addOperand(&type70);
auto param99 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy36_init[] = {0.0f};
model->setOperandValue(dummy36, dummy36_init, sizeof(_Float16) * 1);
static int32_t param99_init[] = {0};
model->setOperandValue(param99, param99_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy36, param99}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type69);
auto dummy37 = model->addOperand(&type70);
auto param100 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy37_init[] = {0.0f};
model->setOperandValue(dummy37, dummy37_init, sizeof(_Float16) * 1);
static int32_t param100_init[] = {0};
model->setOperandValue(param100, param100_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy37, param100}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
auto op1_tmp = model->addOperand(&type69);
auto dummy38 = model->addOperand(&type70);
auto param101 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy39 = model->addOperand(&type70);
auto param102 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy40 = model->addOperand(&type70);
auto param103 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy38_init[] = {0.0f};
model->setOperandValue(dummy38, dummy38_init, sizeof(_Float16) * 1);
static int32_t param101_init[] = {0};
model->setOperandValue(param101, param101_init, sizeof(int32_t) * 1);
static _Float16 dummy39_init[] = {0.0f};
model->setOperandValue(dummy39, dummy39_init, sizeof(_Float16) * 1);
static int32_t param102_init[] = {0};
model->setOperandValue(param102, param102_init, sizeof(int32_t) * 1);
static _Float16 dummy40_init[] = {0.0f};
model->setOperandValue(dummy40, dummy40_init, sizeof(_Float16) * 1);
static int32_t param103_init[] = {0};
model->setOperandValue(param103, param103_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy38, param101}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy39, param102}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy40, param103}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_none_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type69);
auto dummy41 = model->addOperand(&type70);
auto param104 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy42 = model->addOperand(&type70);
auto param105 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy43 = model->addOperand(&type70);
auto param106 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy41_init[] = {0.0f};
model->setOperandValue(dummy41, dummy41_init, sizeof(_Float16) * 1);
static int32_t param104_init[] = {0};
model->setOperandValue(param104, param104_init, sizeof(int32_t) * 1);
static _Float16 dummy42_init[] = {0.0f};
model->setOperandValue(dummy42, dummy42_init, sizeof(_Float16) * 1);
static int32_t param105_init[] = {0};
model->setOperandValue(param105, param105_init, sizeof(int32_t) * 1);
static _Float16 dummy43_init[] = {0.0f};
model->setOperandValue(dummy43, dummy43_init, sizeof(_Float16) * 1);
static int32_t param106_init[] = {0};
model->setOperandValue(param106, param106_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy41, param104}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy42, param105}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy43, param106}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_none_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy44 = model->addOperand(&type9);
auto param107 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy44_init[] = {0.0f};
model->setOperandValue(dummy44, dummy44_init, sizeof(float) * 1);
static int32_t param107_init[] = {0};
model->setOperandValue(param107, param107_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy44, param107}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy45 = model->addOperand(&type9);
auto param108 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy45_init[] = {0.0f};
model->setOperandValue(dummy45, dummy45_init, sizeof(float) * 1);
static int32_t param108_init[] = {0};
model->setOperandValue(param108, param108_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy45, param108}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy46 = model->addOperand(&type9);
auto param109 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy47 = model->addOperand(&type9);
auto param110 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy48 = model->addOperand(&type9);
auto param111 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy46_init[] = {0.0f};
model->setOperandValue(dummy46, dummy46_init, sizeof(float) * 1);
static int32_t param109_init[] = {0};
model->setOperandValue(param109, param109_init, sizeof(int32_t) * 1);
static float dummy47_init[] = {0.0f};
model->setOperandValue(dummy47, dummy47_init, sizeof(float) * 1);
static int32_t param110_init[] = {0};
model->setOperandValue(param110, param110_init, sizeof(int32_t) * 1);
static float dummy48_init[] = {0.0f};
model->setOperandValue(dummy48, dummy48_init, sizeof(float) * 1);
static int32_t param111_init[] = {0};
model->setOperandValue(param111, param111_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy46, param109}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy47, param110}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy48, param111}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy49 = model->addOperand(&type9);
auto param112 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy50 = model->addOperand(&type9);
auto param113 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy51 = model->addOperand(&type9);
auto param114 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy49_init[] = {0.0f};
model->setOperandValue(dummy49, dummy49_init, sizeof(float) * 1);
static int32_t param112_init[] = {0};
model->setOperandValue(param112, param112_init, sizeof(int32_t) * 1);
static float dummy50_init[] = {0.0f};
model->setOperandValue(dummy50, dummy50_init, sizeof(float) * 1);
static int32_t param113_init[] = {0};
model->setOperandValue(param113, param113_init, sizeof(int32_t) * 1);
static float dummy51_init[] = {0.0f};
model->setOperandValue(dummy51, dummy51_init, sizeof(float) * 1);
static int32_t param114_init[] = {0};
model->setOperandValue(param114, param114_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy49, param112}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy50, param113}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy51, param114}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy52 = model->addOperand(&type9);
auto param115 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy52_init[] = {0.0f};
model->setOperandValue(dummy52, dummy52_init, sizeof(float) * 1);
static int32_t param115_init[] = {0};
model->setOperandValue(param115, param115_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy52, param115}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy53 = model->addOperand(&type9);
auto param116 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy53_init[] = {0.0f};
model->setOperandValue(dummy53, dummy53_init, sizeof(float) * 1);
static int32_t param116_init[] = {0};
model->setOperandValue(param116, param116_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy53, param116}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy54 = model->addOperand(&type9);
auto param117 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy55 = model->addOperand(&type9);
auto param118 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy56 = model->addOperand(&type9);
auto param119 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy54_init[] = {0.0f};
model->setOperandValue(dummy54, dummy54_init, sizeof(float) * 1);
static int32_t param117_init[] = {0};
model->setOperandValue(param117, param117_init, sizeof(int32_t) * 1);
static float dummy55_init[] = {0.0f};
model->setOperandValue(dummy55, dummy55_init, sizeof(float) * 1);
static int32_t param118_init[] = {0};
model->setOperandValue(param118, param118_init, sizeof(int32_t) * 1);
static float dummy56_init[] = {0.0f};
model->setOperandValue(dummy56, dummy56_init, sizeof(float) * 1);
static int32_t param119_init[] = {0};
model->setOperandValue(param119, param119_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy54, param117}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy55, param118}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy56, param119}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy57 = model->addOperand(&type9);
auto param120 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy58 = model->addOperand(&type9);
auto param121 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy59 = model->addOperand(&type9);
auto param122 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy57_init[] = {0.0f};
model->setOperandValue(dummy57, dummy57_init, sizeof(float) * 1);
static int32_t param120_init[] = {0};
model->setOperandValue(param120, param120_init, sizeof(int32_t) * 1);
static float dummy58_init[] = {0.0f};
model->setOperandValue(dummy58, dummy58_init, sizeof(float) * 1);
static int32_t param121_init[] = {0};
model->setOperandValue(param121, param121_init, sizeof(int32_t) * 1);
static float dummy59_init[] = {0.0f};
model->setOperandValue(dummy59, dummy59_init, sizeof(float) * 1);
static int32_t param122_init[] = {0};
model->setOperandValue(param122, param122_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy57, param120}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy58, param121}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy59, param122}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
auto op1_tmp = model->addOperand(&type28);
auto dummy60 = model->addOperand(&type33);
auto param123 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy60_init[] = {0};
model->setOperandValue(dummy60, dummy60_init, sizeof(uint8_t) * 1);
static int32_t param123_init[] = {0};
model->setOperandValue(param123, param123_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy60, param123}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type28);
auto dummy61 = model->addOperand(&type33);
auto param124 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy61_init[] = {0};
model->setOperandValue(dummy61, dummy61_init, sizeof(uint8_t) * 1);
static int32_t param124_init[] = {0};
model->setOperandValue(param124, param124_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy61, param124}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
auto op1_tmp = model->addOperand(&type28);
auto dummy62 = model->addOperand(&type33);
auto param125 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy63 = model->addOperand(&type33);
auto param126 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy62_init[] = {0};
model->setOperandValue(dummy62, dummy62_init, sizeof(uint8_t) * 1);
static int32_t param125_init[] = {0};
model->setOperandValue(param125, param125_init, sizeof(int32_t) * 1);
static uint8_t dummy63_init[] = {0};
model->setOperandValue(dummy63, dummy63_init, sizeof(uint8_t) * 1);
static int32_t param126_init[] = {0};
model->setOperandValue(param126, param126_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy62, param125}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy63, param126}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type28);
auto dummy64 = model->addOperand(&type33);
auto param127 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy65 = model->addOperand(&type33);
auto param128 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy64_init[] = {0};
model->setOperandValue(dummy64, dummy64_init, sizeof(uint8_t) * 1);
static int32_t param127_init[] = {0};
model->setOperandValue(param127, param127_init, sizeof(int32_t) * 1);
static uint8_t dummy65_init[] = {0};
model->setOperandValue(dummy65, dummy65_init, sizeof(uint8_t) * 1);
static int32_t param128_init[] = {0};
model->setOperandValue(param128, param128_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy64, param127}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy65, param128}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type34);
auto dummy66 = model->addOperand(&type38);
auto param129 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy66_init[] = {100};
model->setOperandValue(dummy66, dummy66_init, sizeof(uint8_t) * 1);
static int32_t param129_init[] = {0};
model->setOperandValue(param129, param129_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy66, param129}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type34);
auto dummy67 = model->addOperand(&type38);
auto param130 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy67_init[] = {100};
model->setOperandValue(dummy67, dummy67_init, sizeof(uint8_t) * 1);
static int32_t param130_init[] = {0};
model->setOperandValue(param130, param130_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy67, param130}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type34);
auto dummy68 = model->addOperand(&type38);
auto param131 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy69 = model->addOperand(&type39);
auto param132 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy68_init[] = {100};
model->setOperandValue(dummy68, dummy68_init, sizeof(uint8_t) * 1);
static int32_t param131_init[] = {0};
model->setOperandValue(param131, param131_init, sizeof(int32_t) * 1);
static uint8_t dummy69_init[] = {128};
model->setOperandValue(dummy69, dummy69_init, sizeof(uint8_t) * 1);
static int32_t param132_init[] = {0};
model->setOperandValue(param132, param132_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy68, param131}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy69, param132}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type34);
auto dummy70 = model->addOperand(&type38);
auto param133 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy71 = model->addOperand(&type39);
auto param134 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy70_init[] = {100};
model->setOperandValue(dummy70, dummy70_init, sizeof(uint8_t) * 1);
static int32_t param133_init[] = {0};
model->setOperandValue(param133, param133_init, sizeof(int32_t) * 1);
static uint8_t dummy71_init[] = {128};
model->setOperandValue(dummy71, dummy71_init, sizeof(uint8_t) * 1);
static int32_t param134_init[] = {0};
model->setOperandValue(param134, param134_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy70, param133}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy71, param134}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
auto op1_tmp = model->addOperand(&type40);
auto dummy72 = model->addOperand(&type45);
auto param135 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy72_init[] = {100};
model->setOperandValue(dummy72, dummy72_init, sizeof(uint8_t) * 1);
static int32_t param135_init[] = {0};
model->setOperandValue(param135, param135_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy72, param135}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type40);
auto dummy73 = model->addOperand(&type45);
auto param136 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy73_init[] = {100};
model->setOperandValue(dummy73, dummy73_init, sizeof(uint8_t) * 1);
static int32_t param136_init[] = {0};
model->setOperandValue(param136, param136_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy73, param136}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type5(Type::INT32, {});
OperandType type73(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type74(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type73);
auto op3 = model->addOperand(&type74);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
OperandType type75(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type76(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type75);
auto op3 = model->addOperand(&type76);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type77(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type78(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type77);
auto op3 = model->addOperand(&type78);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
auto op1_tmp = model->addOperand(&type40);
auto dummy74 = model->addOperand(&type45);
auto param137 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy74_init[] = {100};
model->setOperandValue(dummy74, dummy74_init, sizeof(uint8_t) * 1);
static int32_t param137_init[] = {0};
model->setOperandValue(param137, param137_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy74, param137}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type79(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type80(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type79);
auto op3 = model->addOperand(&type80);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type40);
auto dummy75 = model->addOperand(&type45);
auto param138 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy75_init[] = {100};
model->setOperandValue(dummy75, dummy75_init, sizeof(uint8_t) * 1);
static int32_t param138_init[] = {0};
model->setOperandValue(param138, param138_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy75, param138}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type40);
auto dummy76 = model->addOperand(&type45);
auto param139 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy76_init[] = {100};
model->setOperandValue(dummy76, dummy76_init, sizeof(uint8_t) * 1);
static int32_t param139_init[] = {0};
model->setOperandValue(param139, param139_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy76, param139}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type40);
auto dummy77 = model->addOperand(&type45);
auto param140 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy77_init[] = {100};
model->setOperandValue(dummy77, dummy77_init, sizeof(uint8_t) * 1);
static int32_t param140_init[] = {0};
model->setOperandValue(param140, param140_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy77, param140}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type81(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type82(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type81);
auto op3 = model->addOperand(&type82);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type83(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type84(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type83);
auto op3 = model->addOperand(&type84);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type85(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type86(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type85);
auto op3 = model->addOperand(&type86);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type40);
auto dummy78 = model->addOperand(&type45);
auto param141 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy78_init[] = {100};
model->setOperandValue(dummy78, dummy78_init, sizeof(uint8_t) * 1);
static int32_t param141_init[] = {0};
model->setOperandValue(param141, param141_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy78, param141}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type87(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type88(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type87);
auto op3 = model->addOperand(&type88);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type40);
auto dummy79 = model->addOperand(&type45);
auto param142 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy79_init[] = {100};
model->setOperandValue(dummy79, dummy79_init, sizeof(uint8_t) * 1);
static int32_t param142_init[] = {0};
model->setOperandValue(param142, param142_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy79, param142}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
auto op1_tmp = model->addOperand(&type69);
auto dummy80 = model->addOperand(&type70);
auto param143 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy80_init[] = {0.0f};
model->setOperandValue(dummy80, dummy80_init, sizeof(_Float16) * 1);
static int32_t param143_init[] = {0};
model->setOperandValue(param143, param143_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy80, param143}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type69);
auto dummy81 = model->addOperand(&type70);
auto param144 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy81_init[] = {0.0f};
model->setOperandValue(dummy81, dummy81_init, sizeof(_Float16) * 1);
static int32_t param144_init[] = {0};
model->setOperandValue(param144, param144_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy81, param144}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
auto op1_tmp = model->addOperand(&type69);
auto dummy82 = model->addOperand(&type70);
auto param145 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy83 = model->addOperand(&type70);
auto param146 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy84 = model->addOperand(&type70);
auto param147 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy82_init[] = {0.0f};
model->setOperandValue(dummy82, dummy82_init, sizeof(_Float16) * 1);
static int32_t param145_init[] = {0};
model->setOperandValue(param145, param145_init, sizeof(int32_t) * 1);
static _Float16 dummy83_init[] = {0.0f};
model->setOperandValue(dummy83, dummy83_init, sizeof(_Float16) * 1);
static int32_t param146_init[] = {0};
model->setOperandValue(param146, param146_init, sizeof(int32_t) * 1);
static _Float16 dummy84_init[] = {0.0f};
model->setOperandValue(dummy84, dummy84_init, sizeof(_Float16) * 1);
static int32_t param147_init[] = {0};
model->setOperandValue(param147, param147_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy82, param145}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy83, param146}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy84, param147}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type69);
auto dummy85 = model->addOperand(&type70);
auto param148 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy86 = model->addOperand(&type70);
auto param149 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy87 = model->addOperand(&type70);
auto param150 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy85_init[] = {0.0f};
model->setOperandValue(dummy85, dummy85_init, sizeof(_Float16) * 1);
static int32_t param148_init[] = {0};
model->setOperandValue(param148, param148_init, sizeof(int32_t) * 1);
static _Float16 dummy86_init[] = {0.0f};
model->setOperandValue(dummy86, dummy86_init, sizeof(_Float16) * 1);
static int32_t param149_init[] = {0};
model->setOperandValue(param149, param149_init, sizeof(int32_t) * 1);
static _Float16 dummy87_init[] = {0.0f};
model->setOperandValue(dummy87, dummy87_init, sizeof(_Float16) * 1);
static int32_t param150_init[] = {0};
model->setOperandValue(param150, param150_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy85, param148}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy86, param149}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy87, param150}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy88 = model->addOperand(&type9);
auto param151 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy88_init[] = {0.0f};
model->setOperandValue(dummy88, dummy88_init, sizeof(float) * 1);
static int32_t param151_init[] = {0};
model->setOperandValue(param151, param151_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy88, param151}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy89 = model->addOperand(&type9);
auto param152 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy89_init[] = {0.0f};
model->setOperandValue(dummy89, dummy89_init, sizeof(float) * 1);
static int32_t param152_init[] = {0};
model->setOperandValue(param152, param152_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy89, param152}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy90 = model->addOperand(&type9);
auto param153 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy91 = model->addOperand(&type9);
auto param154 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy92 = model->addOperand(&type9);
auto param155 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy90_init[] = {0.0f};
model->setOperandValue(dummy90, dummy90_init, sizeof(float) * 1);
static int32_t param153_init[] = {0};
model->setOperandValue(param153, param153_init, sizeof(int32_t) * 1);
static float dummy91_init[] = {0.0f};
model->setOperandValue(dummy91, dummy91_init, sizeof(float) * 1);
static int32_t param154_init[] = {0};
model->setOperandValue(param154, param154_init, sizeof(int32_t) * 1);
static float dummy92_init[] = {0.0f};
model->setOperandValue(dummy92, dummy92_init, sizeof(float) * 1);
static int32_t param155_init[] = {0};
model->setOperandValue(param155, param155_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy90, param153}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy91, param154}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy92, param155}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy93 = model->addOperand(&type9);
auto param156 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy94 = model->addOperand(&type9);
auto param157 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy95 = model->addOperand(&type9);
auto param158 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy93_init[] = {0.0f};
model->setOperandValue(dummy93, dummy93_init, sizeof(float) * 1);
static int32_t param156_init[] = {0};
model->setOperandValue(param156, param156_init, sizeof(int32_t) * 1);
static float dummy94_init[] = {0.0f};
model->setOperandValue(dummy94, dummy94_init, sizeof(float) * 1);
static int32_t param157_init[] = {0};
model->setOperandValue(param157, param157_init, sizeof(int32_t) * 1);
static float dummy95_init[] = {0.0f};
model->setOperandValue(dummy95, dummy95_init, sizeof(float) * 1);
static int32_t param158_init[] = {0};
model->setOperandValue(param158, param158_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy93, param156}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy94, param157}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy95, param158}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy96 = model->addOperand(&type9);
auto param159 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy96_init[] = {0.0f};
model->setOperandValue(dummy96, dummy96_init, sizeof(float) * 1);
static int32_t param159_init[] = {0};
model->setOperandValue(param159, param159_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy96, param159}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy97 = model->addOperand(&type9);
auto param160 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy97_init[] = {0.0f};
model->setOperandValue(dummy97, dummy97_init, sizeof(float) * 1);
static int32_t param160_init[] = {0};
model->setOperandValue(param160, param160_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy97, param160}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy98 = model->addOperand(&type9);
auto param161 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy99 = model->addOperand(&type9);
auto param162 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy100 = model->addOperand(&type9);
auto param163 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy98_init[] = {0.0f};
model->setOperandValue(dummy98, dummy98_init, sizeof(float) * 1);
static int32_t param161_init[] = {0};
model->setOperandValue(param161, param161_init, sizeof(int32_t) * 1);
static float dummy99_init[] = {0.0f};
model->setOperandValue(dummy99, dummy99_init, sizeof(float) * 1);
static int32_t param162_init[] = {0};
model->setOperandValue(param162, param162_init, sizeof(int32_t) * 1);
static float dummy100_init[] = {0.0f};
model->setOperandValue(dummy100, dummy100_init, sizeof(float) * 1);
static int32_t param163_init[] = {0};
model->setOperandValue(param163, param163_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy98, param161}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy99, param162}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy100, param163}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy101 = model->addOperand(&type9);
auto param164 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy102 = model->addOperand(&type9);
auto param165 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy103 = model->addOperand(&type9);
auto param166 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy101_init[] = {0.0f};
model->setOperandValue(dummy101, dummy101_init, sizeof(float) * 1);
static int32_t param164_init[] = {0};
model->setOperandValue(param164, param164_init, sizeof(int32_t) * 1);
static float dummy102_init[] = {0.0f};
model->setOperandValue(dummy102, dummy102_init, sizeof(float) * 1);
static int32_t param165_init[] = {0};
model->setOperandValue(param165, param165_init, sizeof(int32_t) * 1);
static float dummy103_init[] = {0.0f};
model->setOperandValue(dummy103, dummy103_init, sizeof(float) * 1);
static int32_t param166_init[] = {0};
model->setOperandValue(param166, param166_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy101, param164}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy102, param165}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy103, param166}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
auto op1_tmp = model->addOperand(&type28);
auto dummy104 = model->addOperand(&type33);
auto param167 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy104_init[] = {0};
model->setOperandValue(dummy104, dummy104_init, sizeof(uint8_t) * 1);
static int32_t param167_init[] = {0};
model->setOperandValue(param167, param167_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy104, param167}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type28);
auto dummy105 = model->addOperand(&type33);
auto param168 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy105_init[] = {0};
model->setOperandValue(dummy105, dummy105_init, sizeof(uint8_t) * 1);
static int32_t param168_init[] = {0};
model->setOperandValue(param168, param168_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy105, param168}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
auto op1_tmp = model->addOperand(&type28);
auto dummy106 = model->addOperand(&type33);
auto param169 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy107 = model->addOperand(&type33);
auto param170 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy106_init[] = {0};
model->setOperandValue(dummy106, dummy106_init, sizeof(uint8_t) * 1);
static int32_t param169_init[] = {0};
model->setOperandValue(param169, param169_init, sizeof(int32_t) * 1);
static uint8_t dummy107_init[] = {0};
model->setOperandValue(dummy107, dummy107_init, sizeof(uint8_t) * 1);
static int32_t param170_init[] = {0};
model->setOperandValue(param170, param170_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy106, param169}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy107, param170}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type28);
auto dummy108 = model->addOperand(&type33);
auto param171 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy109 = model->addOperand(&type33);
auto param172 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy108_init[] = {0};
model->setOperandValue(dummy108, dummy108_init, sizeof(uint8_t) * 1);
static int32_t param171_init[] = {0};
model->setOperandValue(param171, param171_init, sizeof(int32_t) * 1);
static uint8_t dummy109_init[] = {0};
model->setOperandValue(dummy109, dummy109_init, sizeof(uint8_t) * 1);
static int32_t param172_init[] = {0};
model->setOperandValue(param172, param172_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy108, param171}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy109, param172}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type34);
auto dummy110 = model->addOperand(&type38);
auto param173 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy110_init[] = {100};
model->setOperandValue(dummy110, dummy110_init, sizeof(uint8_t) * 1);
static int32_t param173_init[] = {0};
model->setOperandValue(param173, param173_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy110, param173}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type34);
auto dummy111 = model->addOperand(&type38);
auto param174 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy111_init[] = {100};
model->setOperandValue(dummy111, dummy111_init, sizeof(uint8_t) * 1);
static int32_t param174_init[] = {0};
model->setOperandValue(param174, param174_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy111, param174}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type34);
auto dummy112 = model->addOperand(&type38);
auto param175 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy113 = model->addOperand(&type39);
auto param176 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy112_init[] = {100};
model->setOperandValue(dummy112, dummy112_init, sizeof(uint8_t) * 1);
static int32_t param175_init[] = {0};
model->setOperandValue(param175, param175_init, sizeof(int32_t) * 1);
static uint8_t dummy113_init[] = {128};
model->setOperandValue(dummy113, dummy113_init, sizeof(uint8_t) * 1);
static int32_t param176_init[] = {0};
model->setOperandValue(param176, param176_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy112, param175}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy113, param176}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type34);
auto dummy114 = model->addOperand(&type38);
auto param177 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy115 = model->addOperand(&type39);
auto param178 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy114_init[] = {100};
model->setOperandValue(dummy114, dummy114_init, sizeof(uint8_t) * 1);
static int32_t param177_init[] = {0};
model->setOperandValue(param177, param177_init, sizeof(int32_t) * 1);
static uint8_t dummy115_init[] = {128};
model->setOperandValue(dummy115, dummy115_init, sizeof(uint8_t) * 1);
static int32_t param178_init[] = {0};
model->setOperandValue(param178, param178_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy114, param177}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy115, param178}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
auto op1_tmp = model->addOperand(&type40);
auto dummy116 = model->addOperand(&type45);
auto param179 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy116_init[] = {100};
model->setOperandValue(dummy116, dummy116_init, sizeof(uint8_t) * 1);
static int32_t param179_init[] = {0};
model->setOperandValue(param179, param179_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy116, param179}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type40);
auto dummy117 = model->addOperand(&type45);
auto param180 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy117_init[] = {100};
model->setOperandValue(dummy117, dummy117_init, sizeof(uint8_t) * 1);
static int32_t param180_init[] = {0};
model->setOperandValue(param180, param180_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy117, param180}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type5(Type::INT32, {});
OperandType type89(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type90(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type89);
auto op3 = model->addOperand(&type90);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
OperandType type91(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type92(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type91);
auto op3 = model->addOperand(&type92);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type93(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type94(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type93);
auto op3 = model->addOperand(&type94);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
auto op1_tmp = model->addOperand(&type40);
auto dummy118 = model->addOperand(&type45);
auto param181 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy118_init[] = {100};
model->setOperandValue(dummy118, dummy118_init, sizeof(uint8_t) * 1);
static int32_t param181_init[] = {0};
model->setOperandValue(param181, param181_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy118, param181}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type95(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type96(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type95);
auto op3 = model->addOperand(&type96);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type40);
auto dummy119 = model->addOperand(&type45);
auto param182 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy119_init[] = {100};
model->setOperandValue(dummy119, dummy119_init, sizeof(uint8_t) * 1);
static int32_t param182_init[] = {0};
model->setOperandValue(param182, param182_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy119, param182}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type40);
auto dummy120 = model->addOperand(&type45);
auto param183 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy120_init[] = {100};
model->setOperandValue(dummy120, dummy120_init, sizeof(uint8_t) * 1);
static int32_t param183_init[] = {0};
model->setOperandValue(param183, param183_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy120, param183}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type40);
auto dummy121 = model->addOperand(&type45);
auto param184 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy121_init[] = {100};
model->setOperandValue(dummy121, dummy121_init, sizeof(uint8_t) * 1);
static int32_t param184_init[] = {0};
model->setOperandValue(param184, param184_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy121, param184}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type97(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type98(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type97);
auto op3 = model->addOperand(&type98);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type100(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type99(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type99);
auto op3 = model->addOperand(&type100);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type101(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type102(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type101);
auto op3 = model->addOperand(&type102);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type40);
auto dummy122 = model->addOperand(&type45);
auto param185 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy122_init[] = {100};
model->setOperandValue(dummy122, dummy122_init, sizeof(uint8_t) * 1);
static int32_t param185_init[] = {0};
model->setOperandValue(param185, param185_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy122, param185}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type103(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type104(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type103);
auto op3 = model->addOperand(&type104);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type40);
auto dummy123 = model->addOperand(&type45);
auto param186 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy123_init[] = {100};
model->setOperandValue(dummy123, dummy123_init, sizeof(uint8_t) * 1);
static int32_t param186_init[] = {0};
model->setOperandValue(param186, param186_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy123, param186}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
auto op1_tmp = model->addOperand(&type69);
auto dummy124 = model->addOperand(&type70);
auto param187 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy124_init[] = {0.0f};
model->setOperandValue(dummy124, dummy124_init, sizeof(_Float16) * 1);
static int32_t param187_init[] = {0};
model->setOperandValue(param187, param187_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy124, param187}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type69);
auto dummy125 = model->addOperand(&type70);
auto param188 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy125_init[] = {0.0f};
model->setOperandValue(dummy125, dummy125_init, sizeof(_Float16) * 1);
static int32_t param188_init[] = {0};
model->setOperandValue(param188, param188_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy125, param188}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
auto op1_tmp = model->addOperand(&type69);
auto dummy126 = model->addOperand(&type70);
auto param189 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy127 = model->addOperand(&type70);
auto param190 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy128 = model->addOperand(&type70);
auto param191 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy126_init[] = {0.0f};
model->setOperandValue(dummy126, dummy126_init, sizeof(_Float16) * 1);
static int32_t param189_init[] = {0};
model->setOperandValue(param189, param189_init, sizeof(int32_t) * 1);
static _Float16 dummy127_init[] = {0.0f};
model->setOperandValue(dummy127, dummy127_init, sizeof(_Float16) * 1);
static int32_t param190_init[] = {0};
model->setOperandValue(param190, param190_init, sizeof(int32_t) * 1);
static _Float16 dummy128_init[] = {0.0f};
model->setOperandValue(dummy128, dummy128_init, sizeof(_Float16) * 1);
static int32_t param191_init[] = {0};
model->setOperandValue(param191, param191_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy126, param189}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy127, param190}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy128, param191}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu1_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type69);
auto dummy129 = model->addOperand(&type70);
auto param192 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy130 = model->addOperand(&type70);
auto param193 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy131 = model->addOperand(&type70);
auto param194 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy129_init[] = {0.0f};
model->setOperandValue(dummy129, dummy129_init, sizeof(_Float16) * 1);
static int32_t param192_init[] = {0};
model->setOperandValue(param192, param192_init, sizeof(int32_t) * 1);
static _Float16 dummy130_init[] = {0.0f};
model->setOperandValue(dummy130, dummy130_init, sizeof(_Float16) * 1);
static int32_t param193_init[] = {0};
model->setOperandValue(param193, param193_init, sizeof(int32_t) * 1);
static _Float16 dummy131_init[] = {0.0f};
model->setOperandValue(dummy131, dummy131_init, sizeof(_Float16) * 1);
static int32_t param194_init[] = {0};
model->setOperandValue(param194, param194_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy129, param192}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy130, param193}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy131, param194}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu1_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy132 = model->addOperand(&type9);
auto param195 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy132_init[] = {0.0f};
model->setOperandValue(dummy132, dummy132_init, sizeof(float) * 1);
static int32_t param195_init[] = {0};
model->setOperandValue(param195, param195_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy132, param195}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy133 = model->addOperand(&type9);
auto param196 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy133_init[] = {0.0f};
model->setOperandValue(dummy133, dummy133_init, sizeof(float) * 1);
static int32_t param196_init[] = {0};
model->setOperandValue(param196, param196_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy133, param196}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy134 = model->addOperand(&type9);
auto param197 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy135 = model->addOperand(&type9);
auto param198 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy136 = model->addOperand(&type9);
auto param199 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy134_init[] = {0.0f};
model->setOperandValue(dummy134, dummy134_init, sizeof(float) * 1);
static int32_t param197_init[] = {0};
model->setOperandValue(param197, param197_init, sizeof(int32_t) * 1);
static float dummy135_init[] = {0.0f};
model->setOperandValue(dummy135, dummy135_init, sizeof(float) * 1);
static int32_t param198_init[] = {0};
model->setOperandValue(param198, param198_init, sizeof(int32_t) * 1);
static float dummy136_init[] = {0.0f};
model->setOperandValue(dummy136, dummy136_init, sizeof(float) * 1);
static int32_t param199_init[] = {0};
model->setOperandValue(param199, param199_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy134, param197}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy135, param198}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy136, param199}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy137 = model->addOperand(&type9);
auto param200 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy138 = model->addOperand(&type9);
auto param201 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy139 = model->addOperand(&type9);
auto param202 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy137_init[] = {0.0f};
model->setOperandValue(dummy137, dummy137_init, sizeof(float) * 1);
static int32_t param200_init[] = {0};
model->setOperandValue(param200, param200_init, sizeof(int32_t) * 1);
static float dummy138_init[] = {0.0f};
model->setOperandValue(dummy138, dummy138_init, sizeof(float) * 1);
static int32_t param201_init[] = {0};
model->setOperandValue(param201, param201_init, sizeof(int32_t) * 1);
static float dummy139_init[] = {0.0f};
model->setOperandValue(dummy139, dummy139_init, sizeof(float) * 1);
static int32_t param202_init[] = {0};
model->setOperandValue(param202, param202_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy137, param200}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy138, param201}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy139, param202}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy140 = model->addOperand(&type9);
auto param203 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy140_init[] = {0.0f};
model->setOperandValue(dummy140, dummy140_init, sizeof(float) * 1);
static int32_t param203_init[] = {0};
model->setOperandValue(param203, param203_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy140, param203}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy141 = model->addOperand(&type9);
auto param204 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy141_init[] = {0.0f};
model->setOperandValue(dummy141, dummy141_init, sizeof(float) * 1);
static int32_t param204_init[] = {0};
model->setOperandValue(param204, param204_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy141, param204}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type6(Type::TENSOR_FLOAT32, {1, 5, 5, 2});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type6);
auto op1_tmp = model->addOperand(&type1);
auto dummy142 = model->addOperand(&type9);
auto param205 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy143 = model->addOperand(&type9);
auto param206 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy144 = model->addOperand(&type9);
auto param207 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy142_init[] = {0.0f};
model->setOperandValue(dummy142, dummy142_init, sizeof(float) * 1);
static int32_t param205_init[] = {0};
model->setOperandValue(param205, param205_init, sizeof(int32_t) * 1);
static float dummy143_init[] = {0.0f};
model->setOperandValue(dummy143, dummy143_init, sizeof(float) * 1);
static int32_t param206_init[] = {0};
model->setOperandValue(param206, param206_init, sizeof(int32_t) * 1);
static float dummy144_init[] = {0.0f};
model->setOperandValue(dummy144, dummy144_init, sizeof(float) * 1);
static int32_t param207_init[] = {0};
model->setOperandValue(param207, param207_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy142, param205}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy143, param206}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy144, param207}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type1);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type1);
auto dummy145 = model->addOperand(&type9);
auto param208 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy146 = model->addOperand(&type9);
auto param209 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy147 = model->addOperand(&type9);
auto param210 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy145_init[] = {0.0f};
model->setOperandValue(dummy145, dummy145_init, sizeof(float) * 1);
static int32_t param208_init[] = {0};
model->setOperandValue(param208, param208_init, sizeof(int32_t) * 1);
static float dummy146_init[] = {0.0f};
model->setOperandValue(dummy146, dummy146_init, sizeof(float) * 1);
static int32_t param209_init[] = {0};
model->setOperandValue(param209, param209_init, sizeof(int32_t) * 1);
static float dummy147_init[] = {0.0f};
model->setOperandValue(dummy147, dummy147_init, sizeof(float) * 1);
static int32_t param210_init[] = {0};
model->setOperandValue(param210, param210_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy145, param208}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy146, param209}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy147, param210}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
auto op1_tmp = model->addOperand(&type28);
auto dummy148 = model->addOperand(&type33);
auto param211 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy148_init[] = {0};
model->setOperandValue(dummy148, dummy148_init, sizeof(uint8_t) * 1);
static int32_t param211_init[] = {0};
model->setOperandValue(param211, param211_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy148, param211}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type28);
auto dummy149 = model->addOperand(&type33);
auto param212 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy149_init[] = {0};
model->setOperandValue(dummy149, dummy149_init, sizeof(uint8_t) * 1);
static int32_t param212_init[] = {0};
model->setOperandValue(param212, param212_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy149, param212}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type31(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type31);
auto op1_tmp = model->addOperand(&type28);
auto dummy150 = model->addOperand(&type33);
auto param213 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy151 = model->addOperand(&type33);
auto param214 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy150_init[] = {0};
model->setOperandValue(dummy150, dummy150_init, sizeof(uint8_t) * 1);
static int32_t param213_init[] = {0};
model->setOperandValue(param213, param213_init, sizeof(int32_t) * 1);
static uint8_t dummy151_init[] = {0};
model->setOperandValue(dummy151, dummy151_init, sizeof(uint8_t) * 1);
static int32_t param214_init[] = {0};
model->setOperandValue(param214, param214_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy150, param213}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy151, param214}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type28(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type28);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type28);
auto dummy152 = model->addOperand(&type33);
auto param215 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy153 = model->addOperand(&type33);
auto param216 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy152_init[] = {0};
model->setOperandValue(dummy152, dummy152_init, sizeof(uint8_t) * 1);
static int32_t param215_init[] = {0};
model->setOperandValue(param215, param215_init, sizeof(int32_t) * 1);
static uint8_t dummy153_init[] = {0};
model->setOperandValue(dummy153, dummy153_init, sizeof(uint8_t) * 1);
static int32_t param216_init[] = {0};
model->setOperandValue(param216, param216_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy152, param215}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy153, param216}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type34);
auto dummy154 = model->addOperand(&type38);
auto param217 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy154_init[] = {100};
model->setOperandValue(dummy154, dummy154_init, sizeof(uint8_t) * 1);
static int32_t param217_init[] = {0};
model->setOperandValue(param217, param217_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy154, param217}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type34);
auto dummy155 = model->addOperand(&type38);
auto param218 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy155_init[] = {100};
model->setOperandValue(dummy155, dummy155_init, sizeof(uint8_t) * 1);
static int32_t param218_init[] = {0};
model->setOperandValue(param218, param218_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy155, param218}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type34);
auto dummy156 = model->addOperand(&type38);
auto param219 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy157 = model->addOperand(&type39);
auto param220 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy156_init[] = {100};
model->setOperandValue(dummy156, dummy156_init, sizeof(uint8_t) * 1);
static int32_t param219_init[] = {0};
model->setOperandValue(param219, param219_init, sizeof(int32_t) * 1);
static uint8_t dummy157_init[] = {128};
model->setOperandValue(dummy157, dummy157_init, sizeof(uint8_t) * 1);
static int32_t param220_init[] = {0};
model->setOperandValue(param220, param220_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy156, param219}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy157, param220}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type34);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type34);
auto dummy158 = model->addOperand(&type38);
auto param221 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy159 = model->addOperand(&type39);
auto param222 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy158_init[] = {100};
model->setOperandValue(dummy158, dummy158_init, sizeof(uint8_t) * 1);
static int32_t param221_init[] = {0};
model->setOperandValue(param221, param221_init, sizeof(int32_t) * 1);
static uint8_t dummy159_init[] = {128};
model->setOperandValue(dummy159, dummy159_init, sizeof(uint8_t) * 1);
static int32_t param222_init[] = {0};
model->setOperandValue(param222, param222_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy158, param221}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy159, param222}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
auto op1_tmp = model->addOperand(&type40);
auto dummy160 = model->addOperand(&type45);
auto param223 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy160_init[] = {100};
model->setOperandValue(dummy160, dummy160_init, sizeof(uint8_t) * 1);
static int32_t param223_init[] = {0};
model->setOperandValue(param223, param223_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy160, param223}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type40);
auto dummy161 = model->addOperand(&type45);
auto param224 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy161_init[] = {100};
model->setOperandValue(dummy161, dummy161_init, sizeof(uint8_t) * 1);
static int32_t param224_init[] = {0};
model->setOperandValue(param224, param224_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy161, param224}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type105(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type106(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type105);
auto op3 = model->addOperand(&type106);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type107(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type108(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type107);
auto op3 = model->addOperand(&type108);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type109(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type110(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type43(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type109);
auto op3 = model->addOperand(&type110);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type43);
auto op1_tmp = model->addOperand(&type40);
auto dummy162 = model->addOperand(&type45);
auto param225 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy162_init[] = {100};
model->setOperandValue(dummy162, dummy162_init, sizeof(uint8_t) * 1);
static int32_t param225_init[] = {0};
model->setOperandValue(param225, param225_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy162, param225}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type111(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type112(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type111);
auto op3 = model->addOperand(&type112);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type40);
auto dummy163 = model->addOperand(&type45);
auto param226 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy163_init[] = {100};
model->setOperandValue(dummy163, dummy163_init, sizeof(uint8_t) * 1);
static int32_t param226_init[] = {0};
model->setOperandValue(param226, param226_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy163, param226}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type40);
auto dummy164 = model->addOperand(&type45);
auto param227 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy164_init[] = {100};
model->setOperandValue(dummy164, dummy164_init, sizeof(uint8_t) * 1);
static int32_t param227_init[] = {0};
model->setOperandValue(param227, param227_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy164, param227}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type40);
auto dummy165 = model->addOperand(&type45);
auto param228 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy165_init[] = {100};
model->setOperandValue(dummy165, dummy165_init, sizeof(uint8_t) * 1);
static int32_t param228_init[] = {0};
model->setOperandValue(param228, param228_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy165, param228}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type113(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type114(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type113);
auto op3 = model->addOperand(&type114);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type115(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type116(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type115);
auto op3 = model->addOperand(&type116);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type117(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type118(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type36(Type::TENSOR_QUANT8_ASYMM, {1, 5, 5, 2}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type117);
auto op3 = model->addOperand(&type118);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type36);
auto op1_tmp = model->addOperand(&type40);
auto dummy166 = model->addOperand(&type45);
auto param229 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy166_init[] = {100};
model->setOperandValue(dummy166, dummy166_init, sizeof(uint8_t) * 1);
static int32_t param229_init[] = {0};
model->setOperandValue(param229, param229_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy166, param229}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type119(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type120(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type40(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.25f, 100);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type40);
auto op2 = model->addOperand(&type119);
auto op3 = model->addOperand(&type120);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type40);
auto dummy167 = model->addOperand(&type45);
auto param230 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy167_init[] = {100};
model->setOperandValue(dummy167, dummy167_init, sizeof(uint8_t) * 1);
static int32_t param230_init[] = {0};
model->setOperandValue(param230, param230_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy167, param230}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
auto op1_tmp = model->addOperand(&type69);
auto dummy168 = model->addOperand(&type70);
auto param231 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy168_init[] = {0.0f};
model->setOperandValue(dummy168, dummy168_init, sizeof(_Float16) * 1);
static int32_t param231_init[] = {0};
model->setOperandValue(param231, param231_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy168, param231}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type69);
auto dummy169 = model->addOperand(&type70);
auto param232 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy169_init[] = {0.0f};
model->setOperandValue(dummy169, dummy169_init, sizeof(_Float16) * 1);
static int32_t param232_init[] = {0};
model->setOperandValue(param232, param232_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy169, param232}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type64);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type67(Type::TENSOR_FLOAT16, {1, 5, 5, 2});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type67);
auto op1_tmp = model->addOperand(&type69);
auto dummy170 = model->addOperand(&type70);
auto param233 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy171 = model->addOperand(&type70);
auto param234 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy172 = model->addOperand(&type70);
auto param235 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy170_init[] = {0.0f};
model->setOperandValue(dummy170, dummy170_init, sizeof(_Float16) * 1);
static int32_t param233_init[] = {0};
model->setOperandValue(param233, param233_init, sizeof(int32_t) * 1);
static _Float16 dummy171_init[] = {0.0f};
model->setOperandValue(dummy171, dummy171_init, sizeof(_Float16) * 1);
static int32_t param234_init[] = {0};
model->setOperandValue(param234, param234_init, sizeof(int32_t) * 1);
static _Float16 dummy172_init[] = {0.0f};
model->setOperandValue(dummy172, dummy172_init, sizeof(_Float16) * 1);
static int32_t param235_init[] = {0};
model->setOperandValue(param235, param235_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy170, param233}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy171, param234}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy172, param235}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relu6_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type69);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type69);
auto dummy173 = model->addOperand(&type70);
auto param236 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy174 = model->addOperand(&type70);
auto param237 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy175 = model->addOperand(&type70);
auto param238 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 5, 5, 2};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy173_init[] = {0.0f};
model->setOperandValue(dummy173, dummy173_init, sizeof(_Float16) * 1);
static int32_t param236_init[] = {0};
model->setOperandValue(param236, param236_init, sizeof(int32_t) * 1);
static _Float16 dummy174_init[] = {0.0f};
model->setOperandValue(dummy174, dummy174_init, sizeof(_Float16) * 1);
static int32_t param237_init[] = {0};
model->setOperandValue(param237, param237_init, sizeof(int32_t) * 1);
static _Float16 dummy175_init[] = {0.0f};
model->setOperandValue(dummy175, dummy175_init, sizeof(_Float16) * 1);
static int32_t param238_init[] = {0};
model->setOperandValue(param238, param238_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy173, param236}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy174, param237}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy175, param238}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nhwc_relu6_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy176 = model->addOperand(&type9);
auto param239 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy176_init[] = {0.0f};
model->setOperandValue(dummy176, dummy176_init, sizeof(float) * 1);
static int32_t param239_init[] = {0};
model->setOperandValue(param239, param239_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy176, param239}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy177 = model->addOperand(&type9);
auto param240 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy177_init[] = {0.0f};
model->setOperandValue(dummy177, dummy177_init, sizeof(float) * 1);
static int32_t param240_init[] = {0};
model->setOperandValue(param240, param240_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy177, param240}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy178 = model->addOperand(&type9);
auto param241 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy179 = model->addOperand(&type9);
auto param242 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy180 = model->addOperand(&type9);
auto param243 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy178_init[] = {0.0f};
model->setOperandValue(dummy178, dummy178_init, sizeof(float) * 1);
static int32_t param241_init[] = {0};
model->setOperandValue(param241, param241_init, sizeof(int32_t) * 1);
static float dummy179_init[] = {0.0f};
model->setOperandValue(dummy179, dummy179_init, sizeof(float) * 1);
static int32_t param242_init[] = {0};
model->setOperandValue(param242, param242_init, sizeof(int32_t) * 1);
static float dummy180_init[] = {0.0f};
model->setOperandValue(dummy180, dummy180_init, sizeof(float) * 1);
static int32_t param243_init[] = {0};
model->setOperandValue(param243, param243_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy178, param241}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy179, param242}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy180, param243}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy181 = model->addOperand(&type9);
auto param244 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy182 = model->addOperand(&type9);
auto param245 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy183 = model->addOperand(&type9);
auto param246 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy181_init[] = {0.0f};
model->setOperandValue(dummy181, dummy181_init, sizeof(float) * 1);
static int32_t param244_init[] = {0};
model->setOperandValue(param244, param244_init, sizeof(int32_t) * 1);
static float dummy182_init[] = {0.0f};
model->setOperandValue(dummy182, dummy182_init, sizeof(float) * 1);
static int32_t param245_init[] = {0};
model->setOperandValue(param245, param245_init, sizeof(int32_t) * 1);
static float dummy183_init[] = {0.0f};
model->setOperandValue(dummy183, dummy183_init, sizeof(float) * 1);
static int32_t param246_init[] = {0};
model->setOperandValue(param246, param246_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy181, param244}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy182, param245}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy183, param246}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_none_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_none_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy184 = model->addOperand(&type9);
auto param247 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy184_init[] = {0.0f};
model->setOperandValue(dummy184, dummy184_init, sizeof(float) * 1);
static int32_t param247_init[] = {0};
model->setOperandValue(param247, param247_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy184, param247}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_none_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy185 = model->addOperand(&type9);
auto param248 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy185_init[] = {0.0f};
model->setOperandValue(dummy185, dummy185_init, sizeof(float) * 1);
static int32_t param248_init[] = {0};
model->setOperandValue(param248, param248_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy185, param248}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_none_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_none_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_none_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy186 = model->addOperand(&type9);
auto param249 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy187 = model->addOperand(&type9);
auto param250 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy188 = model->addOperand(&type9);
auto param251 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy186_init[] = {0.0f};
model->setOperandValue(dummy186, dummy186_init, sizeof(float) * 1);
static int32_t param249_init[] = {0};
model->setOperandValue(param249, param249_init, sizeof(int32_t) * 1);
static float dummy187_init[] = {0.0f};
model->setOperandValue(dummy187, dummy187_init, sizeof(float) * 1);
static int32_t param250_init[] = {0};
model->setOperandValue(param250, param250_init, sizeof(int32_t) * 1);
static float dummy188_init[] = {0.0f};
model->setOperandValue(dummy188, dummy188_init, sizeof(float) * 1);
static int32_t param251_init[] = {0};
model->setOperandValue(param251, param251_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy186, param249}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy187, param250}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy188, param251}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_none_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy189 = model->addOperand(&type9);
auto param252 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy190 = model->addOperand(&type9);
auto param253 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy191 = model->addOperand(&type9);
auto param254 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy189_init[] = {0.0f};
model->setOperandValue(dummy189, dummy189_init, sizeof(float) * 1);
static int32_t param252_init[] = {0};
model->setOperandValue(param252, param252_init, sizeof(int32_t) * 1);
static float dummy190_init[] = {0.0f};
model->setOperandValue(dummy190, dummy190_init, sizeof(float) * 1);
static int32_t param253_init[] = {0};
model->setOperandValue(param253, param253_init, sizeof(int32_t) * 1);
static float dummy191_init[] = {0.0f};
model->setOperandValue(dummy191, dummy191_init, sizeof(float) * 1);
static int32_t param254_init[] = {0};
model->setOperandValue(param254, param254_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy189, param252}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy190, param253}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy191, param254}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_none_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
auto op1_tmp = model->addOperand(&type123);
auto dummy192 = model->addOperand(&type33);
auto param255 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy192_init[] = {0};
model->setOperandValue(dummy192, dummy192_init, sizeof(uint8_t) * 1);
static int32_t param255_init[] = {0};
model->setOperandValue(param255, param255_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy192, param255}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type123);
auto dummy193 = model->addOperand(&type33);
auto param256 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy193_init[] = {0};
model->setOperandValue(dummy193, dummy193_init, sizeof(uint8_t) * 1);
static int32_t param256_init[] = {0};
model->setOperandValue(param256, param256_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy193, param256}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
auto op1_tmp = model->addOperand(&type123);
auto dummy194 = model->addOperand(&type33);
auto param257 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy195 = model->addOperand(&type33);
auto param258 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy194_init[] = {0};
model->setOperandValue(dummy194, dummy194_init, sizeof(uint8_t) * 1);
static int32_t param257_init[] = {0};
model->setOperandValue(param257, param257_init, sizeof(int32_t) * 1);
static uint8_t dummy195_init[] = {0};
model->setOperandValue(dummy195, dummy195_init, sizeof(uint8_t) * 1);
static int32_t param258_init[] = {0};
model->setOperandValue(param258, param258_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy194, param257}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy195, param258}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type123);
auto dummy196 = model->addOperand(&type33);
auto param259 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy197 = model->addOperand(&type33);
auto param260 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy196_init[] = {0};
model->setOperandValue(dummy196, dummy196_init, sizeof(uint8_t) * 1);
static int32_t param259_init[] = {0};
model->setOperandValue(param259, param259_init, sizeof(int32_t) * 1);
static uint8_t dummy197_init[] = {0};
model->setOperandValue(dummy197, dummy197_init, sizeof(uint8_t) * 1);
static int32_t param260_init[] = {0};
model->setOperandValue(param260, param260_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy196, param259}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy197, param260}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type125);
auto dummy198 = model->addOperand(&type38);
auto param261 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy198_init[] = {100};
model->setOperandValue(dummy198, dummy198_init, sizeof(uint8_t) * 1);
static int32_t param261_init[] = {0};
model->setOperandValue(param261, param261_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy198, param261}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type125);
auto dummy199 = model->addOperand(&type38);
auto param262 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy199_init[] = {100};
model->setOperandValue(dummy199, dummy199_init, sizeof(uint8_t) * 1);
static int32_t param262_init[] = {0};
model->setOperandValue(param262, param262_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy199, param262}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type125);
auto dummy200 = model->addOperand(&type38);
auto param263 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy201 = model->addOperand(&type39);
auto param264 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy200_init[] = {100};
model->setOperandValue(dummy200, dummy200_init, sizeof(uint8_t) * 1);
static int32_t param263_init[] = {0};
model->setOperandValue(param263, param263_init, sizeof(int32_t) * 1);
static uint8_t dummy201_init[] = {128};
model->setOperandValue(dummy201, dummy201_init, sizeof(uint8_t) * 1);
static int32_t param264_init[] = {0};
model->setOperandValue(param264, param264_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy200, param263}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy201, param264}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type125);
auto dummy202 = model->addOperand(&type38);
auto param265 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy203 = model->addOperand(&type39);
auto param266 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy202_init[] = {100};
model->setOperandValue(dummy202, dummy202_init, sizeof(uint8_t) * 1);
static int32_t param265_init[] = {0};
model->setOperandValue(param265, param265_init, sizeof(int32_t) * 1);
static uint8_t dummy203_init[] = {128};
model->setOperandValue(dummy203, dummy203_init, sizeof(uint8_t) * 1);
static int32_t param266_init[] = {0};
model->setOperandValue(param266, param266_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy202, param265}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy203, param266}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
auto op1_tmp = model->addOperand(&type127);
auto dummy204 = model->addOperand(&type45);
auto param267 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy204_init[] = {100};
model->setOperandValue(dummy204, dummy204_init, sizeof(uint8_t) * 1);
static int32_t param267_init[] = {0};
model->setOperandValue(param267, param267_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy204, param267}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type127);
auto dummy205 = model->addOperand(&type45);
auto param268 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy205_init[] = {100};
model->setOperandValue(dummy205, dummy205_init, sizeof(uint8_t) * 1);
static int32_t param268_init[] = {0};
model->setOperandValue(param268, param268_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy205, param268}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type129(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type130(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type129);
auto op3 = model->addOperand(&type130);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type131(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type132(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type131);
auto op3 = model->addOperand(&type132);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type133(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type134(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type133);
auto op3 = model->addOperand(&type134);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
auto op1_tmp = model->addOperand(&type127);
auto dummy206 = model->addOperand(&type45);
auto param269 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy206_init[] = {100};
model->setOperandValue(dummy206, dummy206_init, sizeof(uint8_t) * 1);
static int32_t param269_init[] = {0};
model->setOperandValue(param269, param269_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy206, param269}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type135(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type136(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type135);
auto op3 = model->addOperand(&type136);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type127);
auto dummy207 = model->addOperand(&type45);
auto param270 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy207_init[] = {100};
model->setOperandValue(dummy207, dummy207_init, sizeof(uint8_t) * 1);
static int32_t param270_init[] = {0};
model->setOperandValue(param270, param270_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy207, param270}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type127);
auto dummy208 = model->addOperand(&type45);
auto param271 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy208_init[] = {100};
model->setOperandValue(dummy208, dummy208_init, sizeof(uint8_t) * 1);
static int32_t param271_init[] = {0};
model->setOperandValue(param271, param271_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy208, param271}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type127);
auto dummy209 = model->addOperand(&type45);
auto param272 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy209_init[] = {100};
model->setOperandValue(dummy209, dummy209_init, sizeof(uint8_t) * 1);
static int32_t param272_init[] = {0};
model->setOperandValue(param272, param272_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy209, param272}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type137(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type138(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type137);
auto op3 = model->addOperand(&type138);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type139(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type140(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type139);
auto op3 = model->addOperand(&type140);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type141(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type142(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type141);
auto op3 = model->addOperand(&type142);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type127);
auto dummy210 = model->addOperand(&type45);
auto param273 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy210_init[] = {100};
model->setOperandValue(dummy210, dummy210_init, sizeof(uint8_t) * 1);
static int32_t param273_init[] = {0};
model->setOperandValue(param273, param273_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy210, param273}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type143(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type144(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type143);
auto op3 = model->addOperand(&type144);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type127);
auto dummy211 = model->addOperand(&type45);
auto param274 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy211_init[] = {100};
model->setOperandValue(dummy211, dummy211_init, sizeof(uint8_t) * 1);
static int32_t param274_init[] = {0};
model->setOperandValue(param274, param274_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy211, param274}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
auto op1_tmp = model->addOperand(&type147);
auto dummy212 = model->addOperand(&type70);
auto param275 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy212_init[] = {0.0f};
model->setOperandValue(dummy212, dummy212_init, sizeof(_Float16) * 1);
static int32_t param275_init[] = {0};
model->setOperandValue(param275, param275_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy212, param275}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type147);
auto dummy213 = model->addOperand(&type70);
auto param276 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy213_init[] = {0.0f};
model->setOperandValue(dummy213, dummy213_init, sizeof(_Float16) * 1);
static int32_t param276_init[] = {0};
model->setOperandValue(param276, param276_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy213, param276}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
auto op1_tmp = model->addOperand(&type147);
auto dummy214 = model->addOperand(&type70);
auto param277 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy215 = model->addOperand(&type70);
auto param278 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy216 = model->addOperand(&type70);
auto param279 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy214_init[] = {0.0f};
model->setOperandValue(dummy214, dummy214_init, sizeof(_Float16) * 1);
static int32_t param277_init[] = {0};
model->setOperandValue(param277, param277_init, sizeof(int32_t) * 1);
static _Float16 dummy215_init[] = {0.0f};
model->setOperandValue(dummy215, dummy215_init, sizeof(_Float16) * 1);
static int32_t param278_init[] = {0};
model->setOperandValue(param278, param278_init, sizeof(int32_t) * 1);
static _Float16 dummy216_init[] = {0.0f};
model->setOperandValue(dummy216, dummy216_init, sizeof(_Float16) * 1);
static int32_t param279_init[] = {0};
model->setOperandValue(param279, param279_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy214, param277}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy215, param278}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy216, param279}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_none_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type147);
auto dummy217 = model->addOperand(&type70);
auto param280 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy218 = model->addOperand(&type70);
auto param281 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy219 = model->addOperand(&type70);
auto param282 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {0};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy217_init[] = {0.0f};
model->setOperandValue(dummy217, dummy217_init, sizeof(_Float16) * 1);
static int32_t param280_init[] = {0};
model->setOperandValue(param280, param280_init, sizeof(int32_t) * 1);
static _Float16 dummy218_init[] = {0.0f};
model->setOperandValue(dummy218, dummy218_init, sizeof(_Float16) * 1);
static int32_t param281_init[] = {0};
model->setOperandValue(param281, param281_init, sizeof(int32_t) * 1);
static _Float16 dummy219_init[] = {0.0f};
model->setOperandValue(dummy219, dummy219_init, sizeof(_Float16) * 1);
static int32_t param282_init[] = {0};
model->setOperandValue(param282, param282_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy217, param280}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy218, param281}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy219, param282}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_none_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy220 = model->addOperand(&type9);
auto param283 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy220_init[] = {0.0f};
model->setOperandValue(dummy220, dummy220_init, sizeof(float) * 1);
static int32_t param283_init[] = {0};
model->setOperandValue(param283, param283_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy220, param283}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy221 = model->addOperand(&type9);
auto param284 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy221_init[] = {0.0f};
model->setOperandValue(dummy221, dummy221_init, sizeof(float) * 1);
static int32_t param284_init[] = {0};
model->setOperandValue(param284, param284_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy221, param284}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy222 = model->addOperand(&type9);
auto param285 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy223 = model->addOperand(&type9);
auto param286 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy224 = model->addOperand(&type9);
auto param287 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy222_init[] = {0.0f};
model->setOperandValue(dummy222, dummy222_init, sizeof(float) * 1);
static int32_t param285_init[] = {0};
model->setOperandValue(param285, param285_init, sizeof(int32_t) * 1);
static float dummy223_init[] = {0.0f};
model->setOperandValue(dummy223, dummy223_init, sizeof(float) * 1);
static int32_t param286_init[] = {0};
model->setOperandValue(param286, param286_init, sizeof(int32_t) * 1);
static float dummy224_init[] = {0.0f};
model->setOperandValue(dummy224, dummy224_init, sizeof(float) * 1);
static int32_t param287_init[] = {0};
model->setOperandValue(param287, param287_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy222, param285}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy223, param286}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy224, param287}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy225 = model->addOperand(&type9);
auto param288 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy226 = model->addOperand(&type9);
auto param289 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy227 = model->addOperand(&type9);
auto param290 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy225_init[] = {0.0f};
model->setOperandValue(dummy225, dummy225_init, sizeof(float) * 1);
static int32_t param288_init[] = {0};
model->setOperandValue(param288, param288_init, sizeof(int32_t) * 1);
static float dummy226_init[] = {0.0f};
model->setOperandValue(dummy226, dummy226_init, sizeof(float) * 1);
static int32_t param289_init[] = {0};
model->setOperandValue(param289, param289_init, sizeof(int32_t) * 1);
static float dummy227_init[] = {0.0f};
model->setOperandValue(dummy227, dummy227_init, sizeof(float) * 1);
static int32_t param290_init[] = {0};
model->setOperandValue(param290, param290_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy225, param288}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy226, param289}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy227, param290}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy228 = model->addOperand(&type9);
auto param291 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy228_init[] = {0.0f};
model->setOperandValue(dummy228, dummy228_init, sizeof(float) * 1);
static int32_t param291_init[] = {0};
model->setOperandValue(param291, param291_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy228, param291}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy229 = model->addOperand(&type9);
auto param292 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy229_init[] = {0.0f};
model->setOperandValue(dummy229, dummy229_init, sizeof(float) * 1);
static int32_t param292_init[] = {0};
model->setOperandValue(param292, param292_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy229, param292}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy230 = model->addOperand(&type9);
auto param293 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy231 = model->addOperand(&type9);
auto param294 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy232 = model->addOperand(&type9);
auto param295 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy230_init[] = {0.0f};
model->setOperandValue(dummy230, dummy230_init, sizeof(float) * 1);
static int32_t param293_init[] = {0};
model->setOperandValue(param293, param293_init, sizeof(int32_t) * 1);
static float dummy231_init[] = {0.0f};
model->setOperandValue(dummy231, dummy231_init, sizeof(float) * 1);
static int32_t param294_init[] = {0};
model->setOperandValue(param294, param294_init, sizeof(int32_t) * 1);
static float dummy232_init[] = {0.0f};
model->setOperandValue(dummy232, dummy232_init, sizeof(float) * 1);
static int32_t param295_init[] = {0};
model->setOperandValue(param295, param295_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy230, param293}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy231, param294}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy232, param295}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy233 = model->addOperand(&type9);
auto param296 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy234 = model->addOperand(&type9);
auto param297 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy235 = model->addOperand(&type9);
auto param298 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy233_init[] = {0.0f};
model->setOperandValue(dummy233, dummy233_init, sizeof(float) * 1);
static int32_t param296_init[] = {0};
model->setOperandValue(param296, param296_init, sizeof(int32_t) * 1);
static float dummy234_init[] = {0.0f};
model->setOperandValue(dummy234, dummy234_init, sizeof(float) * 1);
static int32_t param297_init[] = {0};
model->setOperandValue(param297, param297_init, sizeof(int32_t) * 1);
static float dummy235_init[] = {0.0f};
model->setOperandValue(dummy235, dummy235_init, sizeof(float) * 1);
static int32_t param298_init[] = {0};
model->setOperandValue(param298, param298_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy233, param296}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy234, param297}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy235, param298}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
auto op1_tmp = model->addOperand(&type123);
auto dummy236 = model->addOperand(&type33);
auto param299 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy236_init[] = {0};
model->setOperandValue(dummy236, dummy236_init, sizeof(uint8_t) * 1);
static int32_t param299_init[] = {0};
model->setOperandValue(param299, param299_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy236, param299}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type123);
auto dummy237 = model->addOperand(&type33);
auto param300 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy237_init[] = {0};
model->setOperandValue(dummy237, dummy237_init, sizeof(uint8_t) * 1);
static int32_t param300_init[] = {0};
model->setOperandValue(param300, param300_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy237, param300}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
auto op1_tmp = model->addOperand(&type123);
auto dummy238 = model->addOperand(&type33);
auto param301 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy239 = model->addOperand(&type33);
auto param302 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy238_init[] = {0};
model->setOperandValue(dummy238, dummy238_init, sizeof(uint8_t) * 1);
static int32_t param301_init[] = {0};
model->setOperandValue(param301, param301_init, sizeof(int32_t) * 1);
static uint8_t dummy239_init[] = {0};
model->setOperandValue(dummy239, dummy239_init, sizeof(uint8_t) * 1);
static int32_t param302_init[] = {0};
model->setOperandValue(param302, param302_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy238, param301}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy239, param302}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type123);
auto dummy240 = model->addOperand(&type33);
auto param303 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy241 = model->addOperand(&type33);
auto param304 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy240_init[] = {0};
model->setOperandValue(dummy240, dummy240_init, sizeof(uint8_t) * 1);
static int32_t param303_init[] = {0};
model->setOperandValue(param303, param303_init, sizeof(int32_t) * 1);
static uint8_t dummy241_init[] = {0};
model->setOperandValue(dummy241, dummy241_init, sizeof(uint8_t) * 1);
static int32_t param304_init[] = {0};
model->setOperandValue(param304, param304_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy240, param303}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy241, param304}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type125);
auto dummy242 = model->addOperand(&type38);
auto param305 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy242_init[] = {100};
model->setOperandValue(dummy242, dummy242_init, sizeof(uint8_t) * 1);
static int32_t param305_init[] = {0};
model->setOperandValue(param305, param305_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy242, param305}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type125);
auto dummy243 = model->addOperand(&type38);
auto param306 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy243_init[] = {100};
model->setOperandValue(dummy243, dummy243_init, sizeof(uint8_t) * 1);
static int32_t param306_init[] = {0};
model->setOperandValue(param306, param306_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy243, param306}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type125);
auto dummy244 = model->addOperand(&type38);
auto param307 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy245 = model->addOperand(&type39);
auto param308 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy244_init[] = {100};
model->setOperandValue(dummy244, dummy244_init, sizeof(uint8_t) * 1);
static int32_t param307_init[] = {0};
model->setOperandValue(param307, param307_init, sizeof(int32_t) * 1);
static uint8_t dummy245_init[] = {128};
model->setOperandValue(dummy245, dummy245_init, sizeof(uint8_t) * 1);
static int32_t param308_init[] = {0};
model->setOperandValue(param308, param308_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy244, param307}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy245, param308}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type125);
auto dummy246 = model->addOperand(&type38);
auto param309 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy247 = model->addOperand(&type39);
auto param310 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy246_init[] = {100};
model->setOperandValue(dummy246, dummy246_init, sizeof(uint8_t) * 1);
static int32_t param309_init[] = {0};
model->setOperandValue(param309, param309_init, sizeof(int32_t) * 1);
static uint8_t dummy247_init[] = {128};
model->setOperandValue(dummy247, dummy247_init, sizeof(uint8_t) * 1);
static int32_t param310_init[] = {0};
model->setOperandValue(param310, param310_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy246, param309}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy247, param310}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
auto op1_tmp = model->addOperand(&type127);
auto dummy248 = model->addOperand(&type45);
auto param311 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy248_init[] = {100};
model->setOperandValue(dummy248, dummy248_init, sizeof(uint8_t) * 1);
static int32_t param311_init[] = {0};
model->setOperandValue(param311, param311_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy248, param311}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type127);
auto dummy249 = model->addOperand(&type45);
auto param312 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy249_init[] = {100};
model->setOperandValue(dummy249, dummy249_init, sizeof(uint8_t) * 1);
static int32_t param312_init[] = {0};
model->setOperandValue(param312, param312_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy249, param312}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type148(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type149(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type148);
auto op3 = model->addOperand(&type149);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type150(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type151(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type150);
auto op3 = model->addOperand(&type151);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type152(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type153(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type152);
auto op3 = model->addOperand(&type153);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
auto op1_tmp = model->addOperand(&type127);
auto dummy250 = model->addOperand(&type45);
auto param313 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy250_init[] = {100};
model->setOperandValue(dummy250, dummy250_init, sizeof(uint8_t) * 1);
static int32_t param313_init[] = {0};
model->setOperandValue(param313, param313_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy250, param313}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type154(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type155(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type154);
auto op3 = model->addOperand(&type155);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type127);
auto dummy251 = model->addOperand(&type45);
auto param314 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy251_init[] = {100};
model->setOperandValue(dummy251, dummy251_init, sizeof(uint8_t) * 1);
static int32_t param314_init[] = {0};
model->setOperandValue(param314, param314_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy251, param314}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type127);
auto dummy252 = model->addOperand(&type45);
auto param315 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy252_init[] = {100};
model->setOperandValue(dummy252, dummy252_init, sizeof(uint8_t) * 1);
static int32_t param315_init[] = {0};
model->setOperandValue(param315, param315_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy252, param315}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type127);
auto dummy253 = model->addOperand(&type45);
auto param316 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy253_init[] = {100};
model->setOperandValue(dummy253, dummy253_init, sizeof(uint8_t) * 1);
static int32_t param316_init[] = {0};
model->setOperandValue(param316, param316_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy253, param316}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type156(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type157(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type156);
auto op3 = model->addOperand(&type157);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type158(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type159(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type158);
auto op3 = model->addOperand(&type159);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type160(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type161(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type160);
auto op3 = model->addOperand(&type161);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type127);
auto dummy254 = model->addOperand(&type45);
auto param317 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy254_init[] = {100};
model->setOperandValue(dummy254, dummy254_init, sizeof(uint8_t) * 1);
static int32_t param317_init[] = {0};
model->setOperandValue(param317, param317_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy254, param317}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type162(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type163(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type162);
auto op3 = model->addOperand(&type163);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type127);
auto dummy255 = model->addOperand(&type45);
auto param318 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy255_init[] = {100};
model->setOperandValue(dummy255, dummy255_init, sizeof(uint8_t) * 1);
static int32_t param318_init[] = {0};
model->setOperandValue(param318, param318_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy255, param318}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
auto op1_tmp = model->addOperand(&type147);
auto dummy256 = model->addOperand(&type70);
auto param319 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy256_init[] = {0.0f};
model->setOperandValue(dummy256, dummy256_init, sizeof(_Float16) * 1);
static int32_t param319_init[] = {0};
model->setOperandValue(param319, param319_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy256, param319}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type147);
auto dummy257 = model->addOperand(&type70);
auto param320 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy257_init[] = {0.0f};
model->setOperandValue(dummy257, dummy257_init, sizeof(_Float16) * 1);
static int32_t param320_init[] = {0};
model->setOperandValue(param320, param320_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy257, param320}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
auto op1_tmp = model->addOperand(&type147);
auto dummy258 = model->addOperand(&type70);
auto param321 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy259 = model->addOperand(&type70);
auto param322 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy260 = model->addOperand(&type70);
auto param323 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy258_init[] = {0.0f};
model->setOperandValue(dummy258, dummy258_init, sizeof(_Float16) * 1);
static int32_t param321_init[] = {0};
model->setOperandValue(param321, param321_init, sizeof(int32_t) * 1);
static _Float16 dummy259_init[] = {0.0f};
model->setOperandValue(dummy259, dummy259_init, sizeof(_Float16) * 1);
static int32_t param322_init[] = {0};
model->setOperandValue(param322, param322_init, sizeof(int32_t) * 1);
static _Float16 dummy260_init[] = {0.0f};
model->setOperandValue(dummy260, dummy260_init, sizeof(_Float16) * 1);
static int32_t param323_init[] = {0};
model->setOperandValue(param323, param323_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy258, param321}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy259, param322}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy260, param323}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type147);
auto dummy261 = model->addOperand(&type70);
auto param324 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy262 = model->addOperand(&type70);
auto param325 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy263 = model->addOperand(&type70);
auto param326 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {1};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy261_init[] = {0.0f};
model->setOperandValue(dummy261, dummy261_init, sizeof(_Float16) * 1);
static int32_t param324_init[] = {0};
model->setOperandValue(param324, param324_init, sizeof(int32_t) * 1);
static _Float16 dummy262_init[] = {0.0f};
model->setOperandValue(dummy262, dummy262_init, sizeof(_Float16) * 1);
static int32_t param325_init[] = {0};
model->setOperandValue(param325, param325_init, sizeof(int32_t) * 1);
static _Float16 dummy263_init[] = {0.0f};
model->setOperandValue(dummy263, dummy263_init, sizeof(_Float16) * 1);
static int32_t param326_init[] = {0};
model->setOperandValue(param326, param326_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy261, param324}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy262, param325}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy263, param326}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy264 = model->addOperand(&type9);
auto param327 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy264_init[] = {0.0f};
model->setOperandValue(dummy264, dummy264_init, sizeof(float) * 1);
static int32_t param327_init[] = {0};
model->setOperandValue(param327, param327_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy264, param327}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy265 = model->addOperand(&type9);
auto param328 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy265_init[] = {0.0f};
model->setOperandValue(dummy265, dummy265_init, sizeof(float) * 1);
static int32_t param328_init[] = {0};
model->setOperandValue(param328, param328_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy265, param328}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy266 = model->addOperand(&type9);
auto param329 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy267 = model->addOperand(&type9);
auto param330 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy268 = model->addOperand(&type9);
auto param331 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy266_init[] = {0.0f};
model->setOperandValue(dummy266, dummy266_init, sizeof(float) * 1);
static int32_t param329_init[] = {0};
model->setOperandValue(param329, param329_init, sizeof(int32_t) * 1);
static float dummy267_init[] = {0.0f};
model->setOperandValue(dummy267, dummy267_init, sizeof(float) * 1);
static int32_t param330_init[] = {0};
model->setOperandValue(param330, param330_init, sizeof(int32_t) * 1);
static float dummy268_init[] = {0.0f};
model->setOperandValue(dummy268, dummy268_init, sizeof(float) * 1);
static int32_t param331_init[] = {0};
model->setOperandValue(param331, param331_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy266, param329}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy267, param330}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy268, param331}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy269 = model->addOperand(&type9);
auto param332 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy270 = model->addOperand(&type9);
auto param333 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy271 = model->addOperand(&type9);
auto param334 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy269_init[] = {0.0f};
model->setOperandValue(dummy269, dummy269_init, sizeof(float) * 1);
static int32_t param332_init[] = {0};
model->setOperandValue(param332, param332_init, sizeof(int32_t) * 1);
static float dummy270_init[] = {0.0f};
model->setOperandValue(dummy270, dummy270_init, sizeof(float) * 1);
static int32_t param333_init[] = {0};
model->setOperandValue(param333, param333_init, sizeof(int32_t) * 1);
static float dummy271_init[] = {0.0f};
model->setOperandValue(dummy271, dummy271_init, sizeof(float) * 1);
static int32_t param334_init[] = {0};
model->setOperandValue(param334, param334_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy269, param332}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy270, param333}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy271, param334}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu1_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu1_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy272 = model->addOperand(&type9);
auto param335 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy272_init[] = {0.0f};
model->setOperandValue(dummy272, dummy272_init, sizeof(float) * 1);
static int32_t param335_init[] = {0};
model->setOperandValue(param335, param335_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy272, param335}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu1_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy273 = model->addOperand(&type9);
auto param336 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy273_init[] = {0.0f};
model->setOperandValue(dummy273, dummy273_init, sizeof(float) * 1);
static int32_t param336_init[] = {0};
model->setOperandValue(param336, param336_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy273, param336}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu1_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu1_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu1_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy274 = model->addOperand(&type9);
auto param337 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy275 = model->addOperand(&type9);
auto param338 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy276 = model->addOperand(&type9);
auto param339 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy274_init[] = {0.0f};
model->setOperandValue(dummy274, dummy274_init, sizeof(float) * 1);
static int32_t param337_init[] = {0};
model->setOperandValue(param337, param337_init, sizeof(int32_t) * 1);
static float dummy275_init[] = {0.0f};
model->setOperandValue(dummy275, dummy275_init, sizeof(float) * 1);
static int32_t param338_init[] = {0};
model->setOperandValue(param338, param338_init, sizeof(int32_t) * 1);
static float dummy276_init[] = {0.0f};
model->setOperandValue(dummy276, dummy276_init, sizeof(float) * 1);
static int32_t param339_init[] = {0};
model->setOperandValue(param339, param339_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy274, param337}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy275, param338}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy276, param339}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu1_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy277 = model->addOperand(&type9);
auto param340 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy278 = model->addOperand(&type9);
auto param341 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy279 = model->addOperand(&type9);
auto param342 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy277_init[] = {0.0f};
model->setOperandValue(dummy277, dummy277_init, sizeof(float) * 1);
static int32_t param340_init[] = {0};
model->setOperandValue(param340, param340_init, sizeof(int32_t) * 1);
static float dummy278_init[] = {0.0f};
model->setOperandValue(dummy278, dummy278_init, sizeof(float) * 1);
static int32_t param341_init[] = {0};
model->setOperandValue(param341, param341_init, sizeof(int32_t) * 1);
static float dummy279_init[] = {0.0f};
model->setOperandValue(dummy279, dummy279_init, sizeof(float) * 1);
static int32_t param342_init[] = {0};
model->setOperandValue(param342, param342_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy277, param340}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy278, param341}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy279, param342}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu1_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
auto op1_tmp = model->addOperand(&type123);
auto dummy280 = model->addOperand(&type33);
auto param343 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy280_init[] = {0};
model->setOperandValue(dummy280, dummy280_init, sizeof(uint8_t) * 1);
static int32_t param343_init[] = {0};
model->setOperandValue(param343, param343_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy280, param343}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type123);
auto dummy281 = model->addOperand(&type33);
auto param344 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy281_init[] = {0};
model->setOperandValue(dummy281, dummy281_init, sizeof(uint8_t) * 1);
static int32_t param344_init[] = {0};
model->setOperandValue(param344, param344_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy281, param344}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
auto op1_tmp = model->addOperand(&type123);
auto dummy282 = model->addOperand(&type33);
auto param345 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy283 = model->addOperand(&type33);
auto param346 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy282_init[] = {0};
model->setOperandValue(dummy282, dummy282_init, sizeof(uint8_t) * 1);
static int32_t param345_init[] = {0};
model->setOperandValue(param345, param345_init, sizeof(int32_t) * 1);
static uint8_t dummy283_init[] = {0};
model->setOperandValue(dummy283, dummy283_init, sizeof(uint8_t) * 1);
static int32_t param346_init[] = {0};
model->setOperandValue(param346, param346_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy282, param345}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy283, param346}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type123);
auto dummy284 = model->addOperand(&type33);
auto param347 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy285 = model->addOperand(&type33);
auto param348 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy284_init[] = {0};
model->setOperandValue(dummy284, dummy284_init, sizeof(uint8_t) * 1);
static int32_t param347_init[] = {0};
model->setOperandValue(param347, param347_init, sizeof(int32_t) * 1);
static uint8_t dummy285_init[] = {0};
model->setOperandValue(dummy285, dummy285_init, sizeof(uint8_t) * 1);
static int32_t param348_init[] = {0};
model->setOperandValue(param348, param348_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy284, param347}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy285, param348}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type125);
auto dummy286 = model->addOperand(&type38);
auto param349 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy286_init[] = {100};
model->setOperandValue(dummy286, dummy286_init, sizeof(uint8_t) * 1);
static int32_t param349_init[] = {0};
model->setOperandValue(param349, param349_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy286, param349}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type125);
auto dummy287 = model->addOperand(&type38);
auto param350 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy287_init[] = {100};
model->setOperandValue(dummy287, dummy287_init, sizeof(uint8_t) * 1);
static int32_t param350_init[] = {0};
model->setOperandValue(param350, param350_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy287, param350}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type125);
auto dummy288 = model->addOperand(&type38);
auto param351 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy289 = model->addOperand(&type39);
auto param352 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy288_init[] = {100};
model->setOperandValue(dummy288, dummy288_init, sizeof(uint8_t) * 1);
static int32_t param351_init[] = {0};
model->setOperandValue(param351, param351_init, sizeof(int32_t) * 1);
static uint8_t dummy289_init[] = {128};
model->setOperandValue(dummy289, dummy289_init, sizeof(uint8_t) * 1);
static int32_t param352_init[] = {0};
model->setOperandValue(param352, param352_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy288, param351}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy289, param352}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type125);
auto dummy290 = model->addOperand(&type38);
auto param353 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy291 = model->addOperand(&type39);
auto param354 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy290_init[] = {100};
model->setOperandValue(dummy290, dummy290_init, sizeof(uint8_t) * 1);
static int32_t param353_init[] = {0};
model->setOperandValue(param353, param353_init, sizeof(int32_t) * 1);
static uint8_t dummy291_init[] = {128};
model->setOperandValue(dummy291, dummy291_init, sizeof(uint8_t) * 1);
static int32_t param354_init[] = {0};
model->setOperandValue(param354, param354_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy290, param353}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy291, param354}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
auto op1_tmp = model->addOperand(&type127);
auto dummy292 = model->addOperand(&type45);
auto param355 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy292_init[] = {100};
model->setOperandValue(dummy292, dummy292_init, sizeof(uint8_t) * 1);
static int32_t param355_init[] = {0};
model->setOperandValue(param355, param355_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy292, param355}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type127);
auto dummy293 = model->addOperand(&type45);
auto param356 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy293_init[] = {100};
model->setOperandValue(dummy293, dummy293_init, sizeof(uint8_t) * 1);
static int32_t param356_init[] = {0};
model->setOperandValue(param356, param356_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy293, param356}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type164(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type165(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type164);
auto op3 = model->addOperand(&type165);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type166(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type167(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type166);
auto op3 = model->addOperand(&type167);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type168(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type169(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type168);
auto op3 = model->addOperand(&type169);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
auto op1_tmp = model->addOperand(&type127);
auto dummy294 = model->addOperand(&type45);
auto param357 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy294_init[] = {100};
model->setOperandValue(dummy294, dummy294_init, sizeof(uint8_t) * 1);
static int32_t param357_init[] = {0};
model->setOperandValue(param357, param357_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy294, param357}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type170(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type171(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type170);
auto op3 = model->addOperand(&type171);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type127);
auto dummy295 = model->addOperand(&type45);
auto param358 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy295_init[] = {100};
model->setOperandValue(dummy295, dummy295_init, sizeof(uint8_t) * 1);
static int32_t param358_init[] = {0};
model->setOperandValue(param358, param358_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy295, param358}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type127);
auto dummy296 = model->addOperand(&type45);
auto param359 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy296_init[] = {100};
model->setOperandValue(dummy296, dummy296_init, sizeof(uint8_t) * 1);
static int32_t param359_init[] = {0};
model->setOperandValue(param359, param359_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy296, param359}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type127);
auto dummy297 = model->addOperand(&type45);
auto param360 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy297_init[] = {100};
model->setOperandValue(dummy297, dummy297_init, sizeof(uint8_t) * 1);
static int32_t param360_init[] = {0};
model->setOperandValue(param360, param360_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy297, param360}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type172(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type173(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type172);
auto op3 = model->addOperand(&type173);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type174(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type175(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type174);
auto op3 = model->addOperand(&type175);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type176(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type177(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type176);
auto op3 = model->addOperand(&type177);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type127);
auto dummy298 = model->addOperand(&type45);
auto param361 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy298_init[] = {100};
model->setOperandValue(dummy298, dummy298_init, sizeof(uint8_t) * 1);
static int32_t param361_init[] = {0};
model->setOperandValue(param361, param361_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy298, param361}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type178(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type179(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type178);
auto op3 = model->addOperand(&type179);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type127);
auto dummy299 = model->addOperand(&type45);
auto param362 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy299_init[] = {100};
model->setOperandValue(dummy299, dummy299_init, sizeof(uint8_t) * 1);
static int32_t param362_init[] = {0};
model->setOperandValue(param362, param362_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy299, param362}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
auto op1_tmp = model->addOperand(&type147);
auto dummy300 = model->addOperand(&type70);
auto param363 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy300_init[] = {0.0f};
model->setOperandValue(dummy300, dummy300_init, sizeof(_Float16) * 1);
static int32_t param363_init[] = {0};
model->setOperandValue(param363, param363_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy300, param363}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type147);
auto dummy301 = model->addOperand(&type70);
auto param364 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy301_init[] = {0.0f};
model->setOperandValue(dummy301, dummy301_init, sizeof(_Float16) * 1);
static int32_t param364_init[] = {0};
model->setOperandValue(param364, param364_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy301, param364}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
auto op1_tmp = model->addOperand(&type147);
auto dummy302 = model->addOperand(&type70);
auto param365 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy303 = model->addOperand(&type70);
auto param366 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy304 = model->addOperand(&type70);
auto param367 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy302_init[] = {0.0f};
model->setOperandValue(dummy302, dummy302_init, sizeof(_Float16) * 1);
static int32_t param365_init[] = {0};
model->setOperandValue(param365, param365_init, sizeof(int32_t) * 1);
static _Float16 dummy303_init[] = {0.0f};
model->setOperandValue(dummy303, dummy303_init, sizeof(_Float16) * 1);
static int32_t param366_init[] = {0};
model->setOperandValue(param366, param366_init, sizeof(int32_t) * 1);
static _Float16 dummy304_init[] = {0.0f};
model->setOperandValue(dummy304, dummy304_init, sizeof(_Float16) * 1);
static int32_t param367_init[] = {0};
model->setOperandValue(param367, param367_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy302, param365}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy303, param366}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy304, param367}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu1_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type147);
auto dummy305 = model->addOperand(&type70);
auto param368 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy306 = model->addOperand(&type70);
auto param369 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy307 = model->addOperand(&type70);
auto param370 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {2};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy305_init[] = {0.0f};
model->setOperandValue(dummy305, dummy305_init, sizeof(_Float16) * 1);
static int32_t param368_init[] = {0};
model->setOperandValue(param368, param368_init, sizeof(int32_t) * 1);
static _Float16 dummy306_init[] = {0.0f};
model->setOperandValue(dummy306, dummy306_init, sizeof(_Float16) * 1);
static int32_t param369_init[] = {0};
model->setOperandValue(param369, param369_init, sizeof(int32_t) * 1);
static _Float16 dummy307_init[] = {0.0f};
model->setOperandValue(dummy307, dummy307_init, sizeof(_Float16) * 1);
static int32_t param370_init[] = {0};
model->setOperandValue(param370, param370_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy305, param368}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy306, param369}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy307, param370}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu1_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy308 = model->addOperand(&type9);
auto param371 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy308_init[] = {0.0f};
model->setOperandValue(dummy308, dummy308_init, sizeof(float) * 1);
static int32_t param371_init[] = {0};
model->setOperandValue(param371, param371_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy308, param371}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy309 = model->addOperand(&type9);
auto param372 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy309_init[] = {0.0f};
model->setOperandValue(dummy309, dummy309_init, sizeof(float) * 1);
static int32_t param372_init[] = {0};
model->setOperandValue(param372, param372_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy309, param372}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy310 = model->addOperand(&type9);
auto param373 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy311 = model->addOperand(&type9);
auto param374 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy312 = model->addOperand(&type9);
auto param375 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy310_init[] = {0.0f};
model->setOperandValue(dummy310, dummy310_init, sizeof(float) * 1);
static int32_t param373_init[] = {0};
model->setOperandValue(param373, param373_init, sizeof(int32_t) * 1);
static float dummy311_init[] = {0.0f};
model->setOperandValue(dummy311, dummy311_init, sizeof(float) * 1);
static int32_t param374_init[] = {0};
model->setOperandValue(param374, param374_init, sizeof(int32_t) * 1);
static float dummy312_init[] = {0.0f};
model->setOperandValue(dummy312, dummy312_init, sizeof(float) * 1);
static int32_t param375_init[] = {0};
model->setOperandValue(param375, param375_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy310, param373}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy311, param374}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy312, param375}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy313 = model->addOperand(&type9);
auto param376 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy314 = model->addOperand(&type9);
auto param377 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy315 = model->addOperand(&type9);
auto param378 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy313_init[] = {0.0f};
model->setOperandValue(dummy313, dummy313_init, sizeof(float) * 1);
static int32_t param376_init[] = {0};
model->setOperandValue(param376, param376_init, sizeof(int32_t) * 1);
static float dummy314_init[] = {0.0f};
model->setOperandValue(dummy314, dummy314_init, sizeof(float) * 1);
static int32_t param377_init[] = {0};
model->setOperandValue(param377, param377_init, sizeof(int32_t) * 1);
static float dummy315_init[] = {0.0f};
model->setOperandValue(dummy315, dummy315_init, sizeof(float) * 1);
static int32_t param378_init[] = {0};
model->setOperandValue(param378, param378_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy313, param376}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy314, param377}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy315, param378}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu6_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu6_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy316 = model->addOperand(&type9);
auto param379 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy316_init[] = {0.0f};
model->setOperandValue(dummy316, dummy316_init, sizeof(float) * 1);
static int32_t param379_init[] = {0};
model->setOperandValue(param379, param379_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy316, param379}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu6_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy317 = model->addOperand(&type9);
auto param380 = model->addOperand(&type5);
// Phase 2, operations
static float op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(float) * 18);
static float op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(float) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy317_init[] = {0.0f};
model->setOperandValue(dummy317, dummy317_init, sizeof(float) * 1);
static int32_t param380_init[] = {0};
model->setOperandValue(param380, param380_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy317, param380}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu6_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu6_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu6_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type122(Type::TENSOR_FLOAT32, {1, 2, 5, 5});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type122);
auto op1_tmp = model->addOperand(&type121);
auto dummy318 = model->addOperand(&type9);
auto param381 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy319 = model->addOperand(&type9);
auto param382 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy320 = model->addOperand(&type9);
auto param383 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy318_init[] = {0.0f};
model->setOperandValue(dummy318, dummy318_init, sizeof(float) * 1);
static int32_t param381_init[] = {0};
model->setOperandValue(param381, param381_init, sizeof(int32_t) * 1);
static float dummy319_init[] = {0.0f};
model->setOperandValue(dummy319, dummy319_init, sizeof(float) * 1);
static int32_t param382_init[] = {0};
model->setOperandValue(param382, param382_init, sizeof(int32_t) * 1);
static float dummy320_init[] = {0.0f};
model->setOperandValue(dummy320, dummy320_init, sizeof(float) * 1);
static int32_t param383_init[] = {0};
model->setOperandValue(param383, param383_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy318, param381}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy319, param382}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy320, param383}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu6_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type121);
auto op2 = model->addOperand(&type2);
auto op3 = model->addOperand(&type3);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type27);
auto op1_tmp = model->addOperand(&type121);
auto dummy321 = model->addOperand(&type9);
auto param384 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type2);
auto dummy322 = model->addOperand(&type9);
auto param385 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type3);
auto dummy323 = model->addOperand(&type9);
auto param386 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy321_init[] = {0.0f};
model->setOperandValue(dummy321, dummy321_init, sizeof(float) * 1);
static int32_t param384_init[] = {0};
model->setOperandValue(param384, param384_init, sizeof(int32_t) * 1);
static float dummy322_init[] = {0.0f};
model->setOperandValue(dummy322, dummy322_init, sizeof(float) * 1);
static int32_t param385_init[] = {0};
model->setOperandValue(param385, param385_init, sizeof(int32_t) * 1);
static float dummy323_init[] = {0.0f};
model->setOperandValue(dummy323, dummy323_init, sizeof(float) * 1);
static int32_t param386_init[] = {0};
model->setOperandValue(param386, param386_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy321, param384}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy322, param385}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy323, param386}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relu6_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
auto op1_tmp = model->addOperand(&type123);
auto dummy324 = model->addOperand(&type33);
auto param387 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy324_init[] = {0};
model->setOperandValue(dummy324, dummy324_init, sizeof(uint8_t) * 1);
static int32_t param387_init[] = {0};
model->setOperandValue(param387, param387_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy324, param387}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type123);
auto dummy325 = model->addOperand(&type33);
auto param388 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {2, 6, 10, 14, 18, 22, 26, 30, 34, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy325_init[] = {0};
model->setOperandValue(dummy325, dummy325_init, sizeof(uint8_t) * 1);
static int32_t param388_init[] = {0};
model->setOperandValue(param388, param388_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy325, param388}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type124(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type124);
auto op1_tmp = model->addOperand(&type123);
auto dummy326 = model->addOperand(&type33);
auto param389 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy327 = model->addOperand(&type33);
auto param390 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy326_init[] = {0};
model->setOperandValue(dummy326, dummy326_init, sizeof(uint8_t) * 1);
static int32_t param389_init[] = {0};
model->setOperandValue(param389, param389_init, sizeof(int32_t) * 1);
static uint8_t dummy327_init[] = {0};
model->setOperandValue(dummy327, dummy327_init, sizeof(uint8_t) * 1);
static int32_t param390_init[] = {0};
model->setOperandValue(param390, param390_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy326, param389}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy327, param390}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type123(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 0);
OperandType type29(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 0);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type32(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 0);
OperandType type33(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type123);
auto op2 = model->addOperand(&type29);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type32);
auto op1_tmp = model->addOperand(&type123);
auto dummy328 = model->addOperand(&type33);
auto param391 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type29);
auto dummy329 = model->addOperand(&type33);
auto param392 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy328_init[] = {0};
model->setOperandValue(dummy328, dummy328_init, sizeof(uint8_t) * 1);
static int32_t param391_init[] = {0};
model->setOperandValue(param391, param391_init, sizeof(int32_t) * 1);
static uint8_t dummy329_init[] = {0};
model->setOperandValue(dummy329, dummy329_init, sizeof(uint8_t) * 1);
static int32_t param392_init[] = {0};
model->setOperandValue(param392, param392_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy328, param391}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy329, param392}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type125);
auto dummy330 = model->addOperand(&type38);
auto param393 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy330_init[] = {100};
model->setOperandValue(dummy330, dummy330_init, sizeof(uint8_t) * 1);
static int32_t param393_init[] = {0};
model->setOperandValue(param393, param393_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy330, param393}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type125);
auto dummy331 = model->addOperand(&type38);
auto param394 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op2_init[] = {130, 134, 138, 142, 146, 150, 154, 158, 162, 132, 136, 140, 144, 148, 152, 156, 160, 164};
model->setOperandValue(op2, op2_init, sizeof(uint8_t) * 18);
static int32_t op3_init[] = {-6, -8};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy331_init[] = {100};
model->setOperandValue(dummy331, dummy331_init, sizeof(uint8_t) * 1);
static int32_t param394_init[] = {0};
model->setOperandValue(param394, param394_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy331, param394}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type125);
auto dummy332 = model->addOperand(&type38);
auto param395 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy333 = model->addOperand(&type39);
auto param396 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy332_init[] = {100};
model->setOperandValue(dummy332, dummy332_init, sizeof(uint8_t) * 1);
static int32_t param395_init[] = {0};
model->setOperandValue(param395, param395_init, sizeof(int32_t) * 1);
static uint8_t dummy333_init[] = {128};
model->setOperandValue(dummy333, dummy333_init, sizeof(uint8_t) * 1);
static int32_t param396_init[] = {0};
model->setOperandValue(param396, param396_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy332, param395}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy333, param396}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type30(Type::TENSOR_INT32, {2}, 0.25f, 0);
OperandType type35(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.5f, 128);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type125);
auto op2 = model->addOperand(&type35);
auto op3 = model->addOperand(&type30);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type125);
auto dummy334 = model->addOperand(&type38);
auto param397 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type35);
auto dummy335 = model->addOperand(&type39);
auto param398 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy334_init[] = {100};
model->setOperandValue(dummy334, dummy334_init, sizeof(uint8_t) * 1);
static int32_t param397_init[] = {0};
model->setOperandValue(param397, param397_init, sizeof(int32_t) * 1);
static uint8_t dummy335_init[] = {128};
model->setOperandValue(dummy335, dummy335_init, sizeof(uint8_t) * 1);
static int32_t param398_init[] = {0};
model->setOperandValue(param398, param398_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy334, param397}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy335, param398}, {op2});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op3, op1_tmp, op2_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
auto op1_tmp = model->addOperand(&type127);
auto dummy336 = model->addOperand(&type45);
auto param399 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy336_init[] = {100};
model->setOperandValue(dummy336, dummy336_init, sizeof(uint8_t) * 1);
static int32_t param399_init[] = {0};
model->setOperandValue(param399, param399_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy336, param399}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type41(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type42(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type41);
auto op3 = model->addOperand(&type42);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type127);
auto dummy337 = model->addOperand(&type45);
auto param400 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy337_init[] = {100};
model->setOperandValue(dummy337, dummy337_init, sizeof(uint8_t) * 1);
static int32_t param400_init[] = {0};
model->setOperandValue(param400, param400_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy337, param400}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type180(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type181(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type180);
auto op3 = model->addOperand(&type181);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type182(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type183(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type182);
auto op3 = model->addOperand(&type183);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type128(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.5f, 80);
OperandType type184(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type185(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type184);
auto op3 = model->addOperand(&type185);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type128);
auto op1_tmp = model->addOperand(&type127);
auto dummy338 = model->addOperand(&type45);
auto param401 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy338_init[] = {100};
model->setOperandValue(dummy338, dummy338_init, sizeof(uint8_t) * 1);
static int32_t param401_init[] = {0};
model->setOperandValue(param401, param401_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy338, param401}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type186(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type187(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type44(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.5f, 80);
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type186);
auto op3 = model->addOperand(&type187);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type44);
auto op1_tmp = model->addOperand(&type127);
auto dummy339 = model->addOperand(&type45);
auto param402 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy339_init[] = {100};
model->setOperandValue(dummy339, dummy339_init, sizeof(uint8_t) * 1);
static int32_t param402_init[] = {0};
model->setOperandValue(param402, param402_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy339, param402}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type127);
auto dummy340 = model->addOperand(&type45);
auto param403 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy340_init[] = {100};
model->setOperandValue(dummy340, dummy340_init, sizeof(uint8_t) * 1);
static int32_t param403_init[] = {0};
model->setOperandValue(param403, param403_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy340, param403}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
OperandType type54(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type55(Type::TENSOR_INT32, {2}, 0.0f, 0);
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type54);
auto op3 = model->addOperand(&type55);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type127);
auto dummy341 = model->addOperand(&type45);
auto param404 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op2_init[] = {4, 12, 20, 28, 36, 44, 52, 60, 68, 4, 8, 12, 16, 20, 24, 28, 32, 36};
model->setOperandValue(op2, op2_init, sizeof(int8_t) * 18);
static int32_t op3_init[] = {-24, -16};
model->setOperandValue(op3, op3_init, sizeof(int32_t) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy341_init[] = {100};
model->setOperandValue(dummy341, dummy341_init, sizeof(uint8_t) * 1);
static int32_t param404_init[] = {0};
model->setOperandValue(param404, param404_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy341, param404}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type188(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type189(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type188);
auto op3 = model->addOperand(&type189);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type190(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type191(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type190);
auto op3 = model->addOperand(&type191);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type126(Type::TENSOR_QUANT8_ASYMM, {1, 2, 5, 5}, 0.1f, 80);
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type192(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type193(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type192);
auto op3 = model->addOperand(&type193);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type126);
auto op1_tmp = model->addOperand(&type127);
auto dummy342 = model->addOperand(&type45);
auto param405 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy342_init[] = {100};
model->setOperandValue(dummy342, dummy342_init, sizeof(uint8_t) * 1);
static int32_t param405_init[] = {0};
model->setOperandValue(param405, param405_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy342, param405}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type127(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.25f, 100);
OperandType type194(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {2, 3, 3, 1}, SymmPerChannelQuantParams({0.25f, 0.5f},0));
OperandType type195(Type::TENSOR_INT32, {2}, 0.0f, 0);
OperandType type37(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type45(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op1 = model->addOperand(&type127);
auto op2 = model->addOperand(&type194);
auto op3 = model->addOperand(&type195);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type37);
auto op1_tmp = model->addOperand(&type127);
auto dummy343 = model->addOperand(&type45);
auto param406 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy343_init[] = {100};
model->setOperandValue(dummy343, dummy343_init, sizeof(uint8_t) * 1);
static int32_t param406_init[] = {0};
model->setOperandValue(param406, param406_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy343, param406}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op2, op3, op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
auto op1_tmp = model->addOperand(&type147);
auto dummy344 = model->addOperand(&type70);
auto param407 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy344_init[] = {0.0f};
model->setOperandValue(dummy344, dummy344_init, sizeof(_Float16) * 1);
static int32_t param407_init[] = {0};
model->setOperandValue(param407, param407_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy344, param407}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type65);
auto op3 = model->addOperand(&type66);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type147);
auto dummy345 = model->addOperand(&type70);
auto param408 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op2_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 13.0f, 15.0f, 17.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f};
model->setOperandValue(op2, op2_init, sizeof(_Float16) * 18);
static _Float16 op3_init[] = {-1.5f, -2.0f};
model->setOperandValue(op3, op3_init, sizeof(_Float16) * 2);
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy345_init[] = {0.0f};
model->setOperandValue(dummy345, dummy345_init, sizeof(_Float16) * 1);
static int32_t param408_init[] = {0};
model->setOperandValue(param408, param408_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy345, param408}, {op1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type145);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1, op2, op3},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type146(Type::TENSOR_FLOAT16, {1, 2, 5, 5});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type146);
auto op1_tmp = model->addOperand(&type147);
auto dummy346 = model->addOperand(&type70);
auto param409 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy347 = model->addOperand(&type70);
auto param410 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy348 = model->addOperand(&type70);
auto param411 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy346_init[] = {0.0f};
model->setOperandValue(dummy346, dummy346_init, sizeof(_Float16) * 1);
static int32_t param409_init[] = {0};
model->setOperandValue(param409, param409_init, sizeof(int32_t) * 1);
static _Float16 dummy347_init[] = {0.0f};
model->setOperandValue(dummy347, dummy347_init, sizeof(_Float16) * 1);
static int32_t param410_init[] = {0};
model->setOperandValue(param410, param410_init, sizeof(int32_t) * 1);
static _Float16 dummy348_init[] = {0.0f};
model->setOperandValue(dummy348, dummy348_init, sizeof(_Float16) * 1);
static int32_t param411_init[] = {0};
model->setOperandValue(param411, param411_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy346, param409}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy347, param410}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy348, param411}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relu6_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
OperandType type71(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type72(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto op1 = model->addOperand(&type147);
auto op2 = model->addOperand(&type71);
auto op3 = model->addOperand(&type72);
auto shape = model->addOperand(&type4);
auto param = model->addOperand(&type5);
auto param1 = model->addOperand(&type5);
auto param2 = model->addOperand(&type5);
auto act = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op4 = model->addOperand(&type68);
auto op1_tmp = model->addOperand(&type147);
auto dummy349 = model->addOperand(&type70);
auto param412 = model->addOperand(&type5);
auto op2_tmp = model->addOperand(&type71);
auto dummy350 = model->addOperand(&type70);
auto param413 = model->addOperand(&type5);
auto op3_tmp = model->addOperand(&type72);
auto dummy351 = model->addOperand(&type70);
auto param414 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape_init[] = {1, 2, 5, 5};
model->setOperandValue(shape, shape_init, sizeof(int32_t) * 4);
static int32_t param_init[] = {2};
model->setOperandValue(param, param_init, sizeof(int32_t) * 1);
static int32_t param1_init[] = {2};
model->setOperandValue(param1, param1_init, sizeof(int32_t) * 1);
static int32_t param2_init[] = {2};
model->setOperandValue(param2, param2_init, sizeof(int32_t) * 1);
static int32_t act_init[] = {3};
model->setOperandValue(act, act_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy349_init[] = {0.0f};
model->setOperandValue(dummy349, dummy349_init, sizeof(_Float16) * 1);
static int32_t param412_init[] = {0};
model->setOperandValue(param412, param412_init, sizeof(int32_t) * 1);
static _Float16 dummy350_init[] = {0.0f};
model->setOperandValue(dummy350, dummy350_init, sizeof(_Float16) * 1);
static int32_t param413_init[] = {0};
model->setOperandValue(param413, param413_init, sizeof(int32_t) * 1);
static _Float16 dummy351_init[] = {0.0f};
model->setOperandValue(dummy351, dummy351_init, sizeof(_Float16) * 1);
static int32_t param414_init[] = {0};
model->setOperandValue(param414, param414_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op1_tmp, dummy349, param412}, {op1});
model->addOperation(ANEURALNETWORKS_ADD, {op2_tmp, dummy350, param413}, {op2});
model->addOperation(ANEURALNETWORKS_ADD, {op3_tmp, dummy351, param414}, {op3});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op1, op2, op3, shape, param, param1, param2, act, layout}, {op4});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op1_tmp, op2_tmp, op3_tmp},
{op4});
assert(model->isValid());
}
bool is_ignored_nchw_relu6_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type10(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type10);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type10(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type10);
auto op11_tmp = model->addOperand(&type7);
auto dummy352 = model->addOperand(&type9);
auto param415 = model->addOperand(&type5);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy352_init[] = {0.0f};
model->setOperandValue(dummy352, dummy352_init, sizeof(float) * 1);
static int32_t param415_init[] = {0};
model->setOperandValue(param415, param415_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy352, param415}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
auto op11_tmp = model->addOperand(&type7);
auto dummy353 = model->addOperand(&type9);
auto param416 = model->addOperand(&type5);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy353_init[] = {0.0f};
model->setOperandValue(dummy353, dummy353_init, sizeof(float) * 1);
static int32_t param416_init[] = {0};
model->setOperandValue(param416, param416_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy353, param416}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type10(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type10);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type10(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type10);
auto op11_tmp = model->addOperand(&type7);
auto dummy354 = model->addOperand(&type9);
auto param417 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type8);
auto dummy355 = model->addOperand(&type9);
auto param418 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type9);
auto dummy356 = model->addOperand(&type9);
auto param419 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy354_init[] = {0.0f};
model->setOperandValue(dummy354, dummy354_init, sizeof(float) * 1);
static int32_t param417_init[] = {0};
model->setOperandValue(param417, param417_init, sizeof(int32_t) * 1);
static float dummy355_init[] = {0.0f};
model->setOperandValue(dummy355, dummy355_init, sizeof(float) * 1);
static int32_t param418_init[] = {0};
model->setOperandValue(param418, param418_init, sizeof(int32_t) * 1);
static float dummy356_init[] = {0.0f};
model->setOperandValue(dummy356, dummy356_init, sizeof(float) * 1);
static int32_t param419_init[] = {0};
model->setOperandValue(param419, param419_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy354, param417}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy355, param418}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy356, param419}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
auto op11_tmp = model->addOperand(&type7);
auto dummy357 = model->addOperand(&type9);
auto param420 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type8);
auto dummy358 = model->addOperand(&type9);
auto param421 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type9);
auto dummy359 = model->addOperand(&type9);
auto param422 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy357_init[] = {0.0f};
model->setOperandValue(dummy357, dummy357_init, sizeof(float) * 1);
static int32_t param420_init[] = {0};
model->setOperandValue(param420, param420_init, sizeof(int32_t) * 1);
static float dummy358_init[] = {0.0f};
model->setOperandValue(dummy358, dummy358_init, sizeof(float) * 1);
static int32_t param421_init[] = {0};
model->setOperandValue(param421, param421_init, sizeof(int32_t) * 1);
static float dummy359_init[] = {0.0f};
model->setOperandValue(dummy359, dummy359_init, sizeof(float) * 1);
static int32_t param422_init[] = {0};
model->setOperandValue(param422, param422_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy357, param420}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy358, param421}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy359, param422}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type10(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type10);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type10(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type10);
auto op11_tmp = model->addOperand(&type7);
auto dummy360 = model->addOperand(&type9);
auto param423 = model->addOperand(&type5);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy360_init[] = {0.0f};
model->setOperandValue(dummy360, dummy360_init, sizeof(float) * 1);
static int32_t param423_init[] = {0};
model->setOperandValue(param423, param423_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy360, param423}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
auto op11_tmp = model->addOperand(&type7);
auto dummy361 = model->addOperand(&type9);
auto param424 = model->addOperand(&type5);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy361_init[] = {0.0f};
model->setOperandValue(dummy361, dummy361_init, sizeof(float) * 1);
static int32_t param424_init[] = {0};
model->setOperandValue(param424, param424_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy361, param424}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type10(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type10);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type10(Type::TENSOR_FLOAT32, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type10);
auto op11_tmp = model->addOperand(&type7);
auto dummy362 = model->addOperand(&type9);
auto param425 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type8);
auto dummy363 = model->addOperand(&type9);
auto param426 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type9);
auto dummy364 = model->addOperand(&type9);
auto param427 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy362_init[] = {0.0f};
model->setOperandValue(dummy362, dummy362_init, sizeof(float) * 1);
static int32_t param425_init[] = {0};
model->setOperandValue(param425, param425_init, sizeof(int32_t) * 1);
static float dummy363_init[] = {0.0f};
model->setOperandValue(dummy363, dummy363_init, sizeof(float) * 1);
static int32_t param426_init[] = {0};
model->setOperandValue(param426, param426_init, sizeof(int32_t) * 1);
static float dummy364_init[] = {0.0f};
model->setOperandValue(dummy364, dummy364_init, sizeof(float) * 1);
static int32_t param427_init[] = {0};
model->setOperandValue(param427, param427_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy362, param425}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy363, param426}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy364, param427}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type7(Type::TENSOR_FLOAT32, {1, 1, 2, 1});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type7);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
auto op11_tmp = model->addOperand(&type7);
auto dummy365 = model->addOperand(&type9);
auto param428 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type8);
auto dummy366 = model->addOperand(&type9);
auto param429 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type9);
auto dummy367 = model->addOperand(&type9);
auto param430 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy365_init[] = {0.0f};
model->setOperandValue(dummy365, dummy365_init, sizeof(float) * 1);
static int32_t param428_init[] = {0};
model->setOperandValue(param428, param428_init, sizeof(int32_t) * 1);
static float dummy366_init[] = {0.0f};
model->setOperandValue(dummy366, dummy366_init, sizeof(float) * 1);
static int32_t param429_init[] = {0};
model->setOperandValue(param429, param429_init, sizeof(int32_t) * 1);
static float dummy367_init[] = {0.0f};
model->setOperandValue(dummy367, dummy367_init, sizeof(float) * 1);
static int32_t param430_init[] = {0};
model->setOperandValue(param430, param430_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy365, param428}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy366, param429}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy367, param430}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type199(Type::TENSOR_QUANT8_ASYMM, {1, 3, 4, 1}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type199);
// Phase 2, operations
static uint8_t op21_init[] = {164, 148, 152, 164, 160, 148, 140, 132, 144};
model->setOperandValue(op21, op21_init, sizeof(uint8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
// Phase 2, operations
static uint8_t op21_init[] = {164, 148, 152, 164, 160, 148, 140, 132, 144};
model->setOperandValue(op21, op21_init, sizeof(uint8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type199(Type::TENSOR_QUANT8_ASYMM, {1, 3, 4, 1}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type199);
auto op11_tmp = model->addOperand(&type196);
auto dummy368 = model->addOperand(&type201);
auto param431 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op21_init[] = {164, 148, 152, 164, 160, 148, 140, 132, 144};
model->setOperandValue(op21, op21_init, sizeof(uint8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy368_init[] = {0};
model->setOperandValue(dummy368, dummy368_init, sizeof(uint8_t) * 1);
static int32_t param431_init[] = {0};
model->setOperandValue(param431, param431_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy368, param431}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
auto op11_tmp = model->addOperand(&type196);
auto dummy369 = model->addOperand(&type201);
auto param432 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op21_init[] = {164, 148, 152, 164, 160, 148, 140, 132, 144};
model->setOperandValue(op21, op21_init, sizeof(uint8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy369_init[] = {0};
model->setOperandValue(dummy369, dummy369_init, sizeof(uint8_t) * 1);
static int32_t param432_init[] = {0};
model->setOperandValue(param432, param432_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy369, param432}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type199(Type::TENSOR_QUANT8_ASYMM, {1, 3, 4, 1}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type199);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type199(Type::TENSOR_QUANT8_ASYMM, {1, 3, 4, 1}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type202(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type199);
auto op11_tmp = model->addOperand(&type196);
auto dummy370 = model->addOperand(&type201);
auto param433 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type197);
auto dummy371 = model->addOperand(&type202);
auto param434 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy370_init[] = {0};
model->setOperandValue(dummy370, dummy370_init, sizeof(uint8_t) * 1);
static int32_t param433_init[] = {0};
model->setOperandValue(param433, param433_init, sizeof(int32_t) * 1);
static uint8_t dummy371_init[] = {128};
model->setOperandValue(dummy371, dummy371_init, sizeof(uint8_t) * 1);
static int32_t param434_init[] = {0};
model->setOperandValue(param434, param434_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy370, param433}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy371, param434}, {op21});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op31, op11_tmp, op21_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type202(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
auto op11_tmp = model->addOperand(&type196);
auto dummy372 = model->addOperand(&type201);
auto param435 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type197);
auto dummy373 = model->addOperand(&type202);
auto param436 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy372_init[] = {0};
model->setOperandValue(dummy372, dummy372_init, sizeof(uint8_t) * 1);
static int32_t param435_init[] = {0};
model->setOperandValue(param435, param435_init, sizeof(int32_t) * 1);
static uint8_t dummy373_init[] = {128};
model->setOperandValue(dummy373, dummy373_init, sizeof(uint8_t) * 1);
static int32_t param436_init[] = {0};
model->setOperandValue(param436, param436_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy372, param435}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy373, param436}, {op21});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op31, op11_tmp, op21_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type199(Type::TENSOR_QUANT8_ASYMM, {1, 3, 4, 1}, 20.0f, 50);
OperandType type203(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type204(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type203);
auto op31 = model->addOperand(&type204);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type199);
// Phase 2, operations
static int8_t op21_init[] = {36, 20, 24, 36, 32, 20, 12, 4, 16};
model->setOperandValue(op21, op21_init, sizeof(int8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type203(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type204(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type203);
auto op31 = model->addOperand(&type204);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
// Phase 2, operations
static int8_t op21_init[] = {36, 20, 24, 36, 32, 20, 12, 4, 16};
model->setOperandValue(op21, op21_init, sizeof(int8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type199(Type::TENSOR_QUANT8_ASYMM, {1, 3, 4, 1}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type203(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type204(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type203);
auto op31 = model->addOperand(&type204);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type199);
auto op11_tmp = model->addOperand(&type196);
auto dummy374 = model->addOperand(&type201);
auto param437 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op21_init[] = {36, 20, 24, 36, 32, 20, 12, 4, 16};
model->setOperandValue(op21, op21_init, sizeof(int8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy374_init[] = {0};
model->setOperandValue(dummy374, dummy374_init, sizeof(uint8_t) * 1);
static int32_t param437_init[] = {0};
model->setOperandValue(param437, param437_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy374, param437}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type203(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type204(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type203);
auto op31 = model->addOperand(&type204);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
auto op11_tmp = model->addOperand(&type196);
auto dummy375 = model->addOperand(&type201);
auto param438 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op21_init[] = {36, 20, 24, 36, 32, 20, 12, 4, 16};
model->setOperandValue(op21, op21_init, sizeof(int8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy375_init[] = {0};
model->setOperandValue(dummy375, dummy375_init, sizeof(uint8_t) * 1);
static int32_t param438_init[] = {0};
model->setOperandValue(param438, param438_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy375, param438}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type199(Type::TENSOR_QUANT8_ASYMM, {1, 3, 4, 1}, 20.0f, 50);
OperandType type205(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type206(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type205);
auto op31 = model->addOperand(&type206);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type199);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type207(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type208(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type207);
auto op31 = model->addOperand(&type208);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type199(Type::TENSOR_QUANT8_ASYMM, {1, 3, 4, 1}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type209(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type210(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type209);
auto op31 = model->addOperand(&type210);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type199);
auto op11_tmp = model->addOperand(&type196);
auto dummy376 = model->addOperand(&type201);
auto param439 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy376_init[] = {0};
model->setOperandValue(dummy376, dummy376_init, sizeof(uint8_t) * 1);
static int32_t param439_init[] = {0};
model->setOperandValue(param439, param439_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy376, param439}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op21, op31, op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type196(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 1}, 2.0f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type211(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type212(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type196);
auto op21 = model->addOperand(&type211);
auto op31 = model->addOperand(&type212);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
auto op11_tmp = model->addOperand(&type196);
auto dummy377 = model->addOperand(&type201);
auto param440 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy377_init[] = {0};
model->setOperandValue(dummy377, dummy377_init, sizeof(uint8_t) * 1);
static int32_t param440_init[] = {0};
model->setOperandValue(param440, param440_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy377, param440}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op21, op31, op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type213(Type::TENSOR_FLOAT16, {1, 1, 2, 1});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type216(Type::TENSOR_FLOAT16, {1, 3, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type213);
auto op21 = model->addOperand(&type214);
auto op31 = model->addOperand(&type215);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type216);
// Phase 2, operations
static _Float16 op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(_Float16) * 9);
static _Float16 op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(_Float16) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type213(Type::TENSOR_FLOAT16, {1, 1, 2, 1});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op11 = model->addOperand(&type213);
auto op21 = model->addOperand(&type214);
auto op31 = model->addOperand(&type215);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(_Float16) * 9);
static _Float16 op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(_Float16) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type216(Type::TENSOR_FLOAT16, {1, 3, 4, 1});
OperandType type217(Type::TENSOR_FLOAT16, {1, 1, 2, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type217);
auto op21 = model->addOperand(&type214);
auto op31 = model->addOperand(&type215);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type216);
auto op11_tmp = model->addOperand(&type217);
auto dummy378 = model->addOperand(&type70);
auto param441 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(_Float16) * 9);
static _Float16 op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(_Float16) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy378_init[] = {0.0f};
model->setOperandValue(dummy378, dummy378_init, sizeof(_Float16) * 1);
static int32_t param441_init[] = {0};
model->setOperandValue(param441, param441_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy378, param441}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type217(Type::TENSOR_FLOAT16, {1, 1, 2, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type217);
auto op21 = model->addOperand(&type214);
auto op31 = model->addOperand(&type215);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type68);
auto op11_tmp = model->addOperand(&type217);
auto dummy379 = model->addOperand(&type70);
auto param442 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(_Float16) * 9);
static _Float16 op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(_Float16) * 1);
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy379_init[] = {0.0f};
model->setOperandValue(dummy379, dummy379_init, sizeof(_Float16) * 1);
static int32_t param442_init[] = {0};
model->setOperandValue(param442, param442_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy379, param442}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type213(Type::TENSOR_FLOAT16, {1, 1, 2, 1});
OperandType type216(Type::TENSOR_FLOAT16, {1, 3, 4, 1});
OperandType type218(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type213);
auto op21 = model->addOperand(&type218);
auto op31 = model->addOperand(&type70);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type216);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type213(Type::TENSOR_FLOAT16, {1, 1, 2, 1});
OperandType type218(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type213);
auto op21 = model->addOperand(&type218);
auto op31 = model->addOperand(&type70);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type216(Type::TENSOR_FLOAT16, {1, 3, 4, 1});
OperandType type217(Type::TENSOR_FLOAT16, {1, 1, 2, 1});
OperandType type218(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type217);
auto op21 = model->addOperand(&type218);
auto op31 = model->addOperand(&type70);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type216);
auto op11_tmp = model->addOperand(&type217);
auto dummy380 = model->addOperand(&type70);
auto param443 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type218);
auto dummy381 = model->addOperand(&type70);
auto param444 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type70);
auto dummy382 = model->addOperand(&type70);
auto param445 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy380_init[] = {0.0f};
model->setOperandValue(dummy380, dummy380_init, sizeof(_Float16) * 1);
static int32_t param443_init[] = {0};
model->setOperandValue(param443, param443_init, sizeof(int32_t) * 1);
static _Float16 dummy381_init[] = {0.0f};
model->setOperandValue(dummy381, dummy381_init, sizeof(_Float16) * 1);
static int32_t param444_init[] = {0};
model->setOperandValue(param444, param444_init, sizeof(int32_t) * 1);
static _Float16 dummy382_init[] = {0.0f};
model->setOperandValue(dummy382, dummy382_init, sizeof(_Float16) * 1);
static int32_t param445_init[] = {0};
model->setOperandValue(param445, param445_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy380, param443}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy381, param444}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy382, param445}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type217(Type::TENSOR_FLOAT16, {1, 1, 2, 1});
OperandType type218(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type217);
auto op21 = model->addOperand(&type218);
auto op31 = model->addOperand(&type70);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type68);
auto op11_tmp = model->addOperand(&type217);
auto dummy383 = model->addOperand(&type70);
auto param446 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type218);
auto dummy384 = model->addOperand(&type70);
auto param447 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type70);
auto dummy385 = model->addOperand(&type70);
auto param448 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 3, 4, 1};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy383_init[] = {0.0f};
model->setOperandValue(dummy383, dummy383_init, sizeof(_Float16) * 1);
static int32_t param446_init[] = {0};
model->setOperandValue(param446, param446_init, sizeof(int32_t) * 1);
static _Float16 dummy384_init[] = {0.0f};
model->setOperandValue(dummy384, dummy384_init, sizeof(_Float16) * 1);
static int32_t param447_init[] = {0};
model->setOperandValue(param447, param447_init, sizeof(int32_t) * 1);
static _Float16 dummy385_init[] = {0.0f};
model->setOperandValue(dummy385, dummy385_init, sizeof(_Float16) * 1);
static int32_t param448_init[] = {0};
model->setOperandValue(param448, param448_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy383, param446}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy384, param447}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy385, param448}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type220(Type::TENSOR_FLOAT32, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type220);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type220(Type::TENSOR_FLOAT32, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type220);
auto op11_tmp = model->addOperand(&type219);
auto dummy386 = model->addOperand(&type9);
auto param449 = model->addOperand(&type5);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy386_init[] = {0.0f};
model->setOperandValue(dummy386, dummy386_init, sizeof(float) * 1);
static int32_t param449_init[] = {0};
model->setOperandValue(param449, param449_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy386, param449}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
auto op11_tmp = model->addOperand(&type219);
auto dummy387 = model->addOperand(&type9);
auto param450 = model->addOperand(&type5);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy387_init[] = {0.0f};
model->setOperandValue(dummy387, dummy387_init, sizeof(float) * 1);
static int32_t param450_init[] = {0};
model->setOperandValue(param450, param450_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy387, param450}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type220(Type::TENSOR_FLOAT32, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type220);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type220(Type::TENSOR_FLOAT32, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type220);
auto op11_tmp = model->addOperand(&type219);
auto dummy388 = model->addOperand(&type9);
auto param451 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type8);
auto dummy389 = model->addOperand(&type9);
auto param452 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type9);
auto dummy390 = model->addOperand(&type9);
auto param453 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy388_init[] = {0.0f};
model->setOperandValue(dummy388, dummy388_init, sizeof(float) * 1);
static int32_t param451_init[] = {0};
model->setOperandValue(param451, param451_init, sizeof(int32_t) * 1);
static float dummy389_init[] = {0.0f};
model->setOperandValue(dummy389, dummy389_init, sizeof(float) * 1);
static int32_t param452_init[] = {0};
model->setOperandValue(param452, param452_init, sizeof(int32_t) * 1);
static float dummy390_init[] = {0.0f};
model->setOperandValue(dummy390, dummy390_init, sizeof(float) * 1);
static int32_t param453_init[] = {0};
model->setOperandValue(param453, param453_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy388, param451}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy389, param452}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy390, param453}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
auto op11_tmp = model->addOperand(&type219);
auto dummy391 = model->addOperand(&type9);
auto param454 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type8);
auto dummy392 = model->addOperand(&type9);
auto param455 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type9);
auto dummy393 = model->addOperand(&type9);
auto param456 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy391_init[] = {0.0f};
model->setOperandValue(dummy391, dummy391_init, sizeof(float) * 1);
static int32_t param454_init[] = {0};
model->setOperandValue(param454, param454_init, sizeof(int32_t) * 1);
static float dummy392_init[] = {0.0f};
model->setOperandValue(dummy392, dummy392_init, sizeof(float) * 1);
static int32_t param455_init[] = {0};
model->setOperandValue(param455, param455_init, sizeof(int32_t) * 1);
static float dummy393_init[] = {0.0f};
model->setOperandValue(dummy393, dummy393_init, sizeof(float) * 1);
static int32_t param456_init[] = {0};
model->setOperandValue(param456, param456_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy391, param454}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy392, param455}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy393, param456}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type220(Type::TENSOR_FLOAT32, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type220);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type220(Type::TENSOR_FLOAT32, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type220);
auto op11_tmp = model->addOperand(&type219);
auto dummy394 = model->addOperand(&type9);
auto param457 = model->addOperand(&type5);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy394_init[] = {0.0f};
model->setOperandValue(dummy394, dummy394_init, sizeof(float) * 1);
static int32_t param457_init[] = {0};
model->setOperandValue(param457, param457_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy394, param457}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
auto op11_tmp = model->addOperand(&type219);
auto dummy395 = model->addOperand(&type9);
auto param458 = model->addOperand(&type5);
// Phase 2, operations
static float op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(float) * 9);
static float op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(float) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy395_init[] = {0.0f};
model->setOperandValue(dummy395, dummy395_init, sizeof(float) * 1);
static int32_t param458_init[] = {0};
model->setOperandValue(param458, param458_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy395, param458}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type220(Type::TENSOR_FLOAT32, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type220);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type220(Type::TENSOR_FLOAT32, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type220);
auto op11_tmp = model->addOperand(&type219);
auto dummy396 = model->addOperand(&type9);
auto param459 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type8);
auto dummy397 = model->addOperand(&type9);
auto param460 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type9);
auto dummy398 = model->addOperand(&type9);
auto param461 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy396_init[] = {0.0f};
model->setOperandValue(dummy396, dummy396_init, sizeof(float) * 1);
static int32_t param459_init[] = {0};
model->setOperandValue(param459, param459_init, sizeof(int32_t) * 1);
static float dummy397_init[] = {0.0f};
model->setOperandValue(dummy397, dummy397_init, sizeof(float) * 1);
static int32_t param460_init[] = {0};
model->setOperandValue(param460, param460_init, sizeof(int32_t) * 1);
static float dummy398_init[] = {0.0f};
model->setOperandValue(dummy398, dummy398_init, sizeof(float) * 1);
static int32_t param461_init[] = {0};
model->setOperandValue(param461, param461_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy396, param459}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy397, param460}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy398, param461}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type219(Type::TENSOR_FLOAT32, {1, 1, 1, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type219);
auto op21 = model->addOperand(&type8);
auto op31 = model->addOperand(&type9);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type27);
auto op11_tmp = model->addOperand(&type219);
auto dummy399 = model->addOperand(&type9);
auto param462 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type8);
auto dummy400 = model->addOperand(&type9);
auto param463 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type9);
auto dummy401 = model->addOperand(&type9);
auto param464 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy399_init[] = {0.0f};
model->setOperandValue(dummy399, dummy399_init, sizeof(float) * 1);
static int32_t param462_init[] = {0};
model->setOperandValue(param462, param462_init, sizeof(int32_t) * 1);
static float dummy400_init[] = {0.0f};
model->setOperandValue(dummy400, dummy400_init, sizeof(float) * 1);
static int32_t param463_init[] = {0};
model->setOperandValue(param463, param463_init, sizeof(int32_t) * 1);
static float dummy401_init[] = {0.0f};
model->setOperandValue(dummy401, dummy401_init, sizeof(float) * 1);
static int32_t param464_init[] = {0};
model->setOperandValue(param464, param464_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy399, param462}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy400, param463}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy401, param464}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type222(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 4}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type222);
// Phase 2, operations
static uint8_t op21_init[] = {164, 148, 152, 164, 160, 148, 140, 132, 144};
model->setOperandValue(op21, op21_init, sizeof(uint8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
// Phase 2, operations
static uint8_t op21_init[] = {164, 148, 152, 164, 160, 148, 140, 132, 144};
model->setOperandValue(op21, op21_init, sizeof(uint8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type222(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 4}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type222);
auto op11_tmp = model->addOperand(&type221);
auto dummy402 = model->addOperand(&type201);
auto param465 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op21_init[] = {164, 148, 152, 164, 160, 148, 140, 132, 144};
model->setOperandValue(op21, op21_init, sizeof(uint8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy402_init[] = {0};
model->setOperandValue(dummy402, dummy402_init, sizeof(uint8_t) * 1);
static int32_t param465_init[] = {0};
model->setOperandValue(param465, param465_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy402, param465}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
auto op11_tmp = model->addOperand(&type221);
auto dummy403 = model->addOperand(&type201);
auto param466 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op21_init[] = {164, 148, 152, 164, 160, 148, 140, 132, 144};
model->setOperandValue(op21, op21_init, sizeof(uint8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy403_init[] = {0};
model->setOperandValue(dummy403, dummy403_init, sizeof(uint8_t) * 1);
static int32_t param466_init[] = {0};
model->setOperandValue(param466, param466_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy403, param466}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type222(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 4}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type222);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type202(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 128);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type222(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 4}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type222);
auto op11_tmp = model->addOperand(&type221);
auto dummy404 = model->addOperand(&type201);
auto param467 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type197);
auto dummy405 = model->addOperand(&type202);
auto param468 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy404_init[] = {0};
model->setOperandValue(dummy404, dummy404_init, sizeof(uint8_t) * 1);
static int32_t param467_init[] = {0};
model->setOperandValue(param467, param467_init, sizeof(int32_t) * 1);
static uint8_t dummy405_init[] = {128};
model->setOperandValue(dummy405, dummy405_init, sizeof(uint8_t) * 1);
static int32_t param468_init[] = {0};
model->setOperandValue(param468, param468_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy404, param467}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy405, param468}, {op21});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op31, op11_tmp, op21_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type197(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.25f, 128);
OperandType type198(Type::TENSOR_INT32, {1}, 0.5f, 0);
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type202(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 128);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type197);
auto op31 = model->addOperand(&type198);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
auto op11_tmp = model->addOperand(&type221);
auto dummy406 = model->addOperand(&type201);
auto param469 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type197);
auto dummy407 = model->addOperand(&type202);
auto param470 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy406_init[] = {0};
model->setOperandValue(dummy406, dummy406_init, sizeof(uint8_t) * 1);
static int32_t param469_init[] = {0};
model->setOperandValue(param469, param469_init, sizeof(int32_t) * 1);
static uint8_t dummy407_init[] = {128};
model->setOperandValue(dummy407, dummy407_init, sizeof(uint8_t) * 1);
static int32_t param470_init[] = {0};
model->setOperandValue(param470, param470_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy406, param469}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy407, param470}, {op21});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op31, op11_tmp, op21_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_channelQuant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type203(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type204(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type222(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 4}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type203);
auto op31 = model->addOperand(&type204);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type222);
// Phase 2, operations
static int8_t op21_init[] = {36, 20, 24, 36, 32, 20, 12, 4, 16};
model->setOperandValue(op21, op21_init, sizeof(int8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_channelQuant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_channelQuant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type203(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type204(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type203);
auto op31 = model->addOperand(&type204);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
// Phase 2, operations
static int8_t op21_init[] = {36, 20, 24, 36, 32, 20, 12, 4, 16};
model->setOperandValue(op21, op21_init, sizeof(int8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_channelQuant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_channelQuant8_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type203(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type204(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type222(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 4}, 20.0f, 50);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type203);
auto op31 = model->addOperand(&type204);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type222);
auto op11_tmp = model->addOperand(&type221);
auto dummy408 = model->addOperand(&type201);
auto param471 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op21_init[] = {36, 20, 24, 36, 32, 20, 12, 4, 16};
model->setOperandValue(op21, op21_init, sizeof(int8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy408_init[] = {0};
model->setOperandValue(dummy408, dummy408_init, sizeof(uint8_t) * 1);
static int32_t param471_init[] = {0};
model->setOperandValue(param471, param471_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy408, param471}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_channelQuant8_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_channelQuant8_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type203(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type204(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type203);
auto op31 = model->addOperand(&type204);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
auto op11_tmp = model->addOperand(&type221);
auto dummy409 = model->addOperand(&type201);
auto param472 = model->addOperand(&type5);
// Phase 2, operations
static int8_t op21_init[] = {36, 20, 24, 36, 32, 20, 12, 4, 16};
model->setOperandValue(op21, op21_init, sizeof(int8_t) * 9);
static int32_t op31_init[] = {-2000};
model->setOperandValue(op31, op31_init, sizeof(int32_t) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy409_init[] = {0};
model->setOperandValue(dummy409, dummy409_init, sizeof(uint8_t) * 1);
static int32_t param472_init[] = {0};
model->setOperandValue(param472, param472_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy409, param472}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_channelQuant8_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_channelQuant8_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type222(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 4}, 20.0f, 50);
OperandType type223(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type224(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type223);
auto op31 = model->addOperand(&type224);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type222);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_channelQuant8_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type225(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type226(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type225);
auto op31 = model->addOperand(&type226);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_channelQuant8_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type222(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 4}, 20.0f, 50);
OperandType type227(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type228(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type227);
auto op31 = model->addOperand(&type228);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type222);
auto op11_tmp = model->addOperand(&type221);
auto dummy410 = model->addOperand(&type201);
auto param473 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy410_init[] = {0};
model->setOperandValue(dummy410, dummy410_init, sizeof(uint8_t) * 1);
static int32_t param473_init[] = {0};
model->setOperandValue(param473, param473_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy410, param473}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op21, op31, op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type201(Type::TENSOR_QUANT8_ASYMM, {1}, 2.0f, 0);
OperandType type221(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 2}, 2.0f, 0);
OperandType type229(Type::TENSOR_QUANT8_SYMM_PER_CHANNEL, {1, 3, 3, 1}, SymmPerChannelQuantParams({0.25f},0));
OperandType type230(Type::TENSOR_INT32, {1}, 0.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type221);
auto op21 = model->addOperand(&type229);
auto op31 = model->addOperand(&type230);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type200);
auto op11_tmp = model->addOperand(&type221);
auto dummy411 = model->addOperand(&type201);
auto param474 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy411_init[] = {0};
model->setOperandValue(dummy411, dummy411_init, sizeof(uint8_t) * 1);
static int32_t param474_init[] = {0};
model->setOperandValue(param474, param474_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy411, param474}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op21, op31, op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_channelQuant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type231(Type::TENSOR_FLOAT16, {1, 1, 1, 2});
OperandType type232(Type::TENSOR_FLOAT16, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op11 = model->addOperand(&type231);
auto op21 = model->addOperand(&type214);
auto op31 = model->addOperand(&type215);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type232);
// Phase 2, operations
static _Float16 op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(_Float16) * 9);
static _Float16 op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(_Float16) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type231(Type::TENSOR_FLOAT16, {1, 1, 1, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op11 = model->addOperand(&type231);
auto op21 = model->addOperand(&type214);
auto op31 = model->addOperand(&type215);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(_Float16) * 9);
static _Float16 op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(_Float16) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type232(Type::TENSOR_FLOAT16, {1, 1, 3, 4});
OperandType type233(Type::TENSOR_FLOAT16, {1, 1, 1, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type233);
auto op21 = model->addOperand(&type214);
auto op31 = model->addOperand(&type215);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type232);
auto op11_tmp = model->addOperand(&type233);
auto dummy412 = model->addOperand(&type70);
auto param475 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(_Float16) * 9);
static _Float16 op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(_Float16) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy412_init[] = {0.0f};
model->setOperandValue(dummy412, dummy412_init, sizeof(_Float16) * 1);
static int32_t param475_init[] = {0};
model->setOperandValue(param475, param475_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy412, param475}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type233(Type::TENSOR_FLOAT16, {1, 1, 1, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type233);
auto op21 = model->addOperand(&type214);
auto op31 = model->addOperand(&type215);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type68);
auto op11_tmp = model->addOperand(&type233);
auto dummy413 = model->addOperand(&type70);
auto param476 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op21_init[] = {9.0f, 5.0f, 6.0f, 9.0f, 8.0f, 5.0f, 3.0f, 1.0f, 4.0f};
model->setOperandValue(op21, op21_init, sizeof(_Float16) * 9);
static _Float16 op31_init[] = {-1000.0f};
model->setOperandValue(op31, op31_init, sizeof(_Float16) * 1);
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy413_init[] = {0.0f};
model->setOperandValue(dummy413, dummy413_init, sizeof(_Float16) * 1);
static int32_t param476_init[] = {0};
model->setOperandValue(param476, param476_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy413, param476}, {op11});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type218(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type231(Type::TENSOR_FLOAT16, {1, 1, 1, 2});
OperandType type232(Type::TENSOR_FLOAT16, {1, 1, 3, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type231);
auto op21 = model->addOperand(&type218);
auto op31 = model->addOperand(&type70);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type232);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type218(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type231(Type::TENSOR_FLOAT16, {1, 1, 1, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type231);
auto op21 = model->addOperand(&type218);
auto op31 = model->addOperand(&type70);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11, op21, op31},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type218(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type232(Type::TENSOR_FLOAT16, {1, 1, 3, 4});
OperandType type233(Type::TENSOR_FLOAT16, {1, 1, 1, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type233);
auto op21 = model->addOperand(&type218);
auto op31 = model->addOperand(&type70);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type232);
auto op11_tmp = model->addOperand(&type233);
auto dummy414 = model->addOperand(&type70);
auto param477 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type218);
auto dummy415 = model->addOperand(&type70);
auto param478 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type70);
auto dummy416 = model->addOperand(&type70);
auto param479 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy414_init[] = {0.0f};
model->setOperandValue(dummy414, dummy414_init, sizeof(_Float16) * 1);
static int32_t param477_init[] = {0};
model->setOperandValue(param477, param477_init, sizeof(int32_t) * 1);
static _Float16 dummy415_init[] = {0.0f};
model->setOperandValue(dummy415, dummy415_init, sizeof(_Float16) * 1);
static int32_t param478_init[] = {0};
model->setOperandValue(param478, param478_init, sizeof(int32_t) * 1);
static _Float16 dummy416_init[] = {0.0f};
model->setOperandValue(dummy416, dummy416_init, sizeof(_Float16) * 1);
static int32_t param479_init[] = {0};
model->setOperandValue(param479, param479_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy414, param477}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy415, param478}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy416, param479}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type218(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type233(Type::TENSOR_FLOAT16, {1, 1, 1, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op11 = model->addOperand(&type233);
auto op21 = model->addOperand(&type218);
auto op31 = model->addOperand(&type70);
auto shape1 = model->addOperand(&type4);
auto param3 = model->addOperand(&type5);
auto param4 = model->addOperand(&type5);
auto param5 = model->addOperand(&type5);
auto param6 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op41 = model->addOperand(&type68);
auto op11_tmp = model->addOperand(&type233);
auto dummy417 = model->addOperand(&type70);
auto param480 = model->addOperand(&type5);
auto op21_tmp = model->addOperand(&type218);
auto dummy418 = model->addOperand(&type70);
auto param481 = model->addOperand(&type5);
auto op31_tmp = model->addOperand(&type70);
auto dummy419 = model->addOperand(&type70);
auto param482 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape1_init[] = {1, 1, 3, 4};
model->setOperandValue(shape1, shape1_init, sizeof(int32_t) * 4);
static int32_t param3_init[] = {1};
model->setOperandValue(param3, param3_init, sizeof(int32_t) * 1);
static int32_t param4_init[] = {3};
model->setOperandValue(param4, param4_init, sizeof(int32_t) * 1);
static int32_t param5_init[] = {3};
model->setOperandValue(param5, param5_init, sizeof(int32_t) * 1);
static int32_t param6_init[] = {1};
model->setOperandValue(param6, param6_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy417_init[] = {0.0f};
model->setOperandValue(dummy417, dummy417_init, sizeof(_Float16) * 1);
static int32_t param480_init[] = {0};
model->setOperandValue(param480, param480_init, sizeof(int32_t) * 1);
static _Float16 dummy418_init[] = {0.0f};
model->setOperandValue(dummy418, dummy418_init, sizeof(_Float16) * 1);
static int32_t param481_init[] = {0};
model->setOperandValue(param481, param481_init, sizeof(int32_t) * 1);
static _Float16 dummy419_init[] = {0.0f};
model->setOperandValue(dummy419, dummy419_init, sizeof(_Float16) * 1);
static int32_t param482_init[] = {0};
model->setOperandValue(param482, param482_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op11_tmp, dummy417, param480}, {op11});
model->addOperation(ANEURALNETWORKS_ADD, {op21_tmp, dummy418, param481}, {op21});
model->addOperation(ANEURALNETWORKS_ADD, {op31_tmp, dummy419, param482}, {op31});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op11, op21, op31, shape1, param3, param4, param5, param6, layout}, {op41});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op11_tmp, op21_tmp, op31_tmp},
{op41});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type13);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type13);
auto op12_tmp = model->addOperand(&type11);
auto dummy420 = model->addOperand(&type9);
auto param483 = model->addOperand(&type5);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy420_init[] = {0.0f};
model->setOperandValue(dummy420, dummy420_init, sizeof(float) * 1);
static int32_t param483_init[] = {0};
model->setOperandValue(param483, param483_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy420, param483}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
auto op12_tmp = model->addOperand(&type11);
auto dummy421 = model->addOperand(&type9);
auto param484 = model->addOperand(&type5);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy421_init[] = {0.0f};
model->setOperandValue(dummy421, dummy421_init, sizeof(float) * 1);
static int32_t param484_init[] = {0};
model->setOperandValue(param484, param484_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy421, param484}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type13);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type13);
auto op12_tmp = model->addOperand(&type11);
auto dummy422 = model->addOperand(&type9);
auto param485 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type12);
auto dummy423 = model->addOperand(&type9);
auto param486 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type9);
auto dummy424 = model->addOperand(&type9);
auto param487 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy422_init[] = {0.0f};
model->setOperandValue(dummy422, dummy422_init, sizeof(float) * 1);
static int32_t param485_init[] = {0};
model->setOperandValue(param485, param485_init, sizeof(int32_t) * 1);
static float dummy423_init[] = {0.0f};
model->setOperandValue(dummy423, dummy423_init, sizeof(float) * 1);
static int32_t param486_init[] = {0};
model->setOperandValue(param486, param486_init, sizeof(int32_t) * 1);
static float dummy424_init[] = {0.0f};
model->setOperandValue(dummy424, dummy424_init, sizeof(float) * 1);
static int32_t param487_init[] = {0};
model->setOperandValue(param487, param487_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy422, param485}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy423, param486}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy424, param487}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
auto op12_tmp = model->addOperand(&type11);
auto dummy425 = model->addOperand(&type9);
auto param488 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type12);
auto dummy426 = model->addOperand(&type9);
auto param489 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type9);
auto dummy427 = model->addOperand(&type9);
auto param490 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy425_init[] = {0.0f};
model->setOperandValue(dummy425, dummy425_init, sizeof(float) * 1);
static int32_t param488_init[] = {0};
model->setOperandValue(param488, param488_init, sizeof(int32_t) * 1);
static float dummy426_init[] = {0.0f};
model->setOperandValue(dummy426, dummy426_init, sizeof(float) * 1);
static int32_t param489_init[] = {0};
model->setOperandValue(param489, param489_init, sizeof(int32_t) * 1);
static float dummy427_init[] = {0.0f};
model->setOperandValue(dummy427, dummy427_init, sizeof(float) * 1);
static int32_t param490_init[] = {0};
model->setOperandValue(param490, param490_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy425, param488}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy426, param489}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy427, param490}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type13);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type13);
auto op12_tmp = model->addOperand(&type11);
auto dummy428 = model->addOperand(&type9);
auto param491 = model->addOperand(&type5);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy428_init[] = {0.0f};
model->setOperandValue(dummy428, dummy428_init, sizeof(float) * 1);
static int32_t param491_init[] = {0};
model->setOperandValue(param491, param491_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy428, param491}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
auto op12_tmp = model->addOperand(&type11);
auto dummy429 = model->addOperand(&type9);
auto param492 = model->addOperand(&type5);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy429_init[] = {0.0f};
model->setOperandValue(dummy429, dummy429_init, sizeof(float) * 1);
static int32_t param492_init[] = {0};
model->setOperandValue(param492, param492_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy429, param492}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type13);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type13);
auto op12_tmp = model->addOperand(&type11);
auto dummy430 = model->addOperand(&type9);
auto param493 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type12);
auto dummy431 = model->addOperand(&type9);
auto param494 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type9);
auto dummy432 = model->addOperand(&type9);
auto param495 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy430_init[] = {0.0f};
model->setOperandValue(dummy430, dummy430_init, sizeof(float) * 1);
static int32_t param493_init[] = {0};
model->setOperandValue(param493, param493_init, sizeof(int32_t) * 1);
static float dummy431_init[] = {0.0f};
model->setOperandValue(dummy431, dummy431_init, sizeof(float) * 1);
static int32_t param494_init[] = {0};
model->setOperandValue(param494, param494_init, sizeof(int32_t) * 1);
static float dummy432_init[] = {0.0f};
model->setOperandValue(dummy432, dummy432_init, sizeof(float) * 1);
static int32_t param495_init[] = {0};
model->setOperandValue(param495, param495_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy430, param493}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy431, param494}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy432, param495}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type11);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
auto op12_tmp = model->addOperand(&type11);
auto dummy433 = model->addOperand(&type9);
auto param496 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type12);
auto dummy434 = model->addOperand(&type9);
auto param497 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type9);
auto dummy435 = model->addOperand(&type9);
auto param498 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy433_init[] = {0.0f};
model->setOperandValue(dummy433, dummy433_init, sizeof(float) * 1);
static int32_t param496_init[] = {0};
model->setOperandValue(param496, param496_init, sizeof(int32_t) * 1);
static float dummy434_init[] = {0.0f};
model->setOperandValue(dummy434, dummy434_init, sizeof(float) * 1);
static int32_t param497_init[] = {0};
model->setOperandValue(param497, param497_init, sizeof(int32_t) * 1);
static float dummy435_init[] = {0.0f};
model->setOperandValue(dummy435, dummy435_init, sizeof(float) * 1);
static int32_t param498_init[] = {0};
model->setOperandValue(param498, param498_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy433, param496}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy434, param497}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy435, param498}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type237(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 16.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type234);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type237);
// Phase 2, operations
static uint8_t op22_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op22, op22_init, sizeof(uint8_t) * 18);
static int32_t op32_init[] = {0};
model->setOperandValue(op32, op32_init, sizeof(int32_t) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type234);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type238);
// Phase 2, operations
static uint8_t op22_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op22, op22_init, sizeof(uint8_t) * 18);
static int32_t op32_init[] = {0};
model->setOperandValue(op32, op32_init, sizeof(int32_t) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type237(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 16.0f, 0);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type234);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type237);
auto op12_tmp = model->addOperand(&type234);
auto dummy436 = model->addOperand(&type38);
auto param499 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op22_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op22, op22_init, sizeof(uint8_t) * 18);
static int32_t op32_init[] = {0};
model->setOperandValue(op32, op32_init, sizeof(int32_t) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy436_init[] = {100};
model->setOperandValue(dummy436, dummy436_init, sizeof(uint8_t) * 1);
static int32_t param499_init[] = {0};
model->setOperandValue(param499, param499_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy436, param499}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type234);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type238);
auto op12_tmp = model->addOperand(&type234);
auto dummy437 = model->addOperand(&type38);
auto param500 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op22_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op22, op22_init, sizeof(uint8_t) * 18);
static int32_t op32_init[] = {0};
model->setOperandValue(op32, op32_init, sizeof(int32_t) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy437_init[] = {100};
model->setOperandValue(dummy437, dummy437_init, sizeof(uint8_t) * 1);
static int32_t param500_init[] = {0};
model->setOperandValue(param500, param500_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy437, param500}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type237(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 16.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type234);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type237);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type234);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type238);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type237(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 16.0f, 0);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type234);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type237);
auto op12_tmp = model->addOperand(&type234);
auto dummy438 = model->addOperand(&type38);
auto param501 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type235);
auto dummy439 = model->addOperand(&type39);
auto param502 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy438_init[] = {100};
model->setOperandValue(dummy438, dummy438_init, sizeof(uint8_t) * 1);
static int32_t param501_init[] = {0};
model->setOperandValue(param501, param501_init, sizeof(int32_t) * 1);
static uint8_t dummy439_init[] = {128};
model->setOperandValue(dummy439, dummy439_init, sizeof(uint8_t) * 1);
static int32_t param502_init[] = {0};
model->setOperandValue(param502, param502_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy438, param501}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy439, param502}, {op22});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op32, op12_tmp, op22_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type234);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type238);
auto op12_tmp = model->addOperand(&type234);
auto dummy440 = model->addOperand(&type38);
auto param503 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type235);
auto dummy441 = model->addOperand(&type39);
auto param504 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy440_init[] = {100};
model->setOperandValue(dummy440, dummy440_init, sizeof(uint8_t) * 1);
static int32_t param503_init[] = {0};
model->setOperandValue(param503, param503_init, sizeof(int32_t) * 1);
static uint8_t dummy441_init[] = {128};
model->setOperandValue(dummy441, dummy441_init, sizeof(uint8_t) * 1);
static int32_t param504_init[] = {0};
model->setOperandValue(param504, param504_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy440, param503}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy441, param504}, {op22});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op32, op12_tmp, op22_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type241(Type::TENSOR_FLOAT16, {1, 4, 4, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type239);
auto op22 = model->addOperand(&type240);
auto op32 = model->addOperand(&type215);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type241);
// Phase 2, operations
static _Float16 op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(_Float16) * 18);
static _Float16 op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(_Float16) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op12 = model->addOperand(&type239);
auto op22 = model->addOperand(&type240);
auto op32 = model->addOperand(&type215);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(_Float16) * 18);
static _Float16 op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(_Float16) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type241(Type::TENSOR_FLOAT16, {1, 4, 4, 1});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type242);
auto op22 = model->addOperand(&type240);
auto op32 = model->addOperand(&type215);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type241);
auto op12_tmp = model->addOperand(&type242);
auto dummy442 = model->addOperand(&type70);
auto param505 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(_Float16) * 18);
static _Float16 op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(_Float16) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy442_init[] = {0.0f};
model->setOperandValue(dummy442, dummy442_init, sizeof(_Float16) * 1);
static int32_t param505_init[] = {0};
model->setOperandValue(param505, param505_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy442, param505}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type242);
auto op22 = model->addOperand(&type240);
auto op32 = model->addOperand(&type215);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type68);
auto op12_tmp = model->addOperand(&type242);
auto dummy443 = model->addOperand(&type70);
auto param506 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(_Float16) * 18);
static _Float16 op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(_Float16) * 1);
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy443_init[] = {0.0f};
model->setOperandValue(dummy443, dummy443_init, sizeof(_Float16) * 1);
static int32_t param506_init[] = {0};
model->setOperandValue(param506, param506_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy443, param506}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type241(Type::TENSOR_FLOAT16, {1, 4, 4, 1});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type239);
auto op22 = model->addOperand(&type243);
auto op32 = model->addOperand(&type70);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type241);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type239);
auto op22 = model->addOperand(&type243);
auto op32 = model->addOperand(&type70);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type241(Type::TENSOR_FLOAT16, {1, 4, 4, 1});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type242);
auto op22 = model->addOperand(&type243);
auto op32 = model->addOperand(&type70);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type241);
auto op12_tmp = model->addOperand(&type242);
auto dummy444 = model->addOperand(&type70);
auto param507 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type243);
auto dummy445 = model->addOperand(&type70);
auto param508 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type70);
auto dummy446 = model->addOperand(&type70);
auto param509 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy444_init[] = {0.0f};
model->setOperandValue(dummy444, dummy444_init, sizeof(_Float16) * 1);
static int32_t param507_init[] = {0};
model->setOperandValue(param507, param507_init, sizeof(int32_t) * 1);
static _Float16 dummy445_init[] = {0.0f};
model->setOperandValue(dummy445, dummy445_init, sizeof(_Float16) * 1);
static int32_t param508_init[] = {0};
model->setOperandValue(param508, param508_init, sizeof(int32_t) * 1);
static _Float16 dummy446_init[] = {0.0f};
model->setOperandValue(dummy446, dummy446_init, sizeof(_Float16) * 1);
static int32_t param509_init[] = {0};
model->setOperandValue(param509, param509_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy444, param507}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy445, param508}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy446, param509}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type242);
auto op22 = model->addOperand(&type243);
auto op32 = model->addOperand(&type70);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type68);
auto op12_tmp = model->addOperand(&type242);
auto dummy447 = model->addOperand(&type70);
auto param510 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type243);
auto dummy448 = model->addOperand(&type70);
auto param511 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type70);
auto dummy449 = model->addOperand(&type70);
auto param512 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 4, 4, 1};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy447_init[] = {0.0f};
model->setOperandValue(dummy447, dummy447_init, sizeof(_Float16) * 1);
static int32_t param510_init[] = {0};
model->setOperandValue(param510, param510_init, sizeof(int32_t) * 1);
static _Float16 dummy448_init[] = {0.0f};
model->setOperandValue(dummy448, dummy448_init, sizeof(_Float16) * 1);
static int32_t param511_init[] = {0};
model->setOperandValue(param511, param511_init, sizeof(int32_t) * 1);
static _Float16 dummy449_init[] = {0.0f};
model->setOperandValue(dummy449, dummy449_init, sizeof(_Float16) * 1);
static int32_t param512_init[] = {0};
model->setOperandValue(param512, param512_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy447, param510}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy448, param511}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy449, param512}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type245);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type245);
auto op12_tmp = model->addOperand(&type244);
auto dummy450 = model->addOperand(&type9);
auto param513 = model->addOperand(&type5);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy450_init[] = {0.0f};
model->setOperandValue(dummy450, dummy450_init, sizeof(float) * 1);
static int32_t param513_init[] = {0};
model->setOperandValue(param513, param513_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy450, param513}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
auto op12_tmp = model->addOperand(&type244);
auto dummy451 = model->addOperand(&type9);
auto param514 = model->addOperand(&type5);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy451_init[] = {0.0f};
model->setOperandValue(dummy451, dummy451_init, sizeof(float) * 1);
static int32_t param514_init[] = {0};
model->setOperandValue(param514, param514_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy451, param514}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type245);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type245);
auto op12_tmp = model->addOperand(&type244);
auto dummy452 = model->addOperand(&type9);
auto param515 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type12);
auto dummy453 = model->addOperand(&type9);
auto param516 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type9);
auto dummy454 = model->addOperand(&type9);
auto param517 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy452_init[] = {0.0f};
model->setOperandValue(dummy452, dummy452_init, sizeof(float) * 1);
static int32_t param515_init[] = {0};
model->setOperandValue(param515, param515_init, sizeof(int32_t) * 1);
static float dummy453_init[] = {0.0f};
model->setOperandValue(dummy453, dummy453_init, sizeof(float) * 1);
static int32_t param516_init[] = {0};
model->setOperandValue(param516, param516_init, sizeof(int32_t) * 1);
static float dummy454_init[] = {0.0f};
model->setOperandValue(dummy454, dummy454_init, sizeof(float) * 1);
static int32_t param517_init[] = {0};
model->setOperandValue(param517, param517_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy452, param515}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy453, param516}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy454, param517}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
auto op12_tmp = model->addOperand(&type244);
auto dummy455 = model->addOperand(&type9);
auto param518 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type12);
auto dummy456 = model->addOperand(&type9);
auto param519 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type9);
auto dummy457 = model->addOperand(&type9);
auto param520 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy455_init[] = {0.0f};
model->setOperandValue(dummy455, dummy455_init, sizeof(float) * 1);
static int32_t param518_init[] = {0};
model->setOperandValue(param518, param518_init, sizeof(int32_t) * 1);
static float dummy456_init[] = {0.0f};
model->setOperandValue(dummy456, dummy456_init, sizeof(float) * 1);
static int32_t param519_init[] = {0};
model->setOperandValue(param519, param519_init, sizeof(int32_t) * 1);
static float dummy457_init[] = {0.0f};
model->setOperandValue(dummy457, dummy457_init, sizeof(float) * 1);
static int32_t param520_init[] = {0};
model->setOperandValue(param520, param520_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy455, param518}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy456, param519}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy457, param520}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type245);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type245);
auto op12_tmp = model->addOperand(&type244);
auto dummy458 = model->addOperand(&type9);
auto param521 = model->addOperand(&type5);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy458_init[] = {0.0f};
model->setOperandValue(dummy458, dummy458_init, sizeof(float) * 1);
static int32_t param521_init[] = {0};
model->setOperandValue(param521, param521_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy458, param521}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
auto op12_tmp = model->addOperand(&type244);
auto dummy459 = model->addOperand(&type9);
auto param522 = model->addOperand(&type5);
// Phase 2, operations
static float op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(float) * 18);
static float op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(float) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy459_init[] = {0.0f};
model->setOperandValue(dummy459, dummy459_init, sizeof(float) * 1);
static int32_t param522_init[] = {0};
model->setOperandValue(param522, param522_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy459, param522}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type245);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type245);
auto op12_tmp = model->addOperand(&type244);
auto dummy460 = model->addOperand(&type9);
auto param523 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type12);
auto dummy461 = model->addOperand(&type9);
auto param524 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type9);
auto dummy462 = model->addOperand(&type9);
auto param525 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy460_init[] = {0.0f};
model->setOperandValue(dummy460, dummy460_init, sizeof(float) * 1);
static int32_t param523_init[] = {0};
model->setOperandValue(param523, param523_init, sizeof(int32_t) * 1);
static float dummy461_init[] = {0.0f};
model->setOperandValue(dummy461, dummy461_init, sizeof(float) * 1);
static int32_t param524_init[] = {0};
model->setOperandValue(param524, param524_init, sizeof(int32_t) * 1);
static float dummy462_init[] = {0.0f};
model->setOperandValue(dummy462, dummy462_init, sizeof(float) * 1);
static int32_t param525_init[] = {0};
model->setOperandValue(param525, param525_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy460, param523}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy461, param524}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy462, param525}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type244);
auto op22 = model->addOperand(&type12);
auto op32 = model->addOperand(&type9);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type27);
auto op12_tmp = model->addOperand(&type244);
auto dummy463 = model->addOperand(&type9);
auto param526 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type12);
auto dummy464 = model->addOperand(&type9);
auto param527 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type9);
auto dummy465 = model->addOperand(&type9);
auto param528 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy463_init[] = {0.0f};
model->setOperandValue(dummy463, dummy463_init, sizeof(float) * 1);
static int32_t param526_init[] = {0};
model->setOperandValue(param526, param526_init, sizeof(int32_t) * 1);
static float dummy464_init[] = {0.0f};
model->setOperandValue(dummy464, dummy464_init, sizeof(float) * 1);
static int32_t param527_init[] = {0};
model->setOperandValue(param527, param527_init, sizeof(int32_t) * 1);
static float dummy465_init[] = {0.0f};
model->setOperandValue(dummy465, dummy465_init, sizeof(float) * 1);
static int32_t param528_init[] = {0};
model->setOperandValue(param528, param528_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy463, param526}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy464, param527}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy465, param528}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type247(Type::TENSOR_QUANT8_ASYMM, {1, 1, 4, 4}, 16.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type246);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type247);
// Phase 2, operations
static uint8_t op22_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op22, op22_init, sizeof(uint8_t) * 18);
static int32_t op32_init[] = {0};
model->setOperandValue(op32, op32_init, sizeof(int32_t) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type246);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type238);
// Phase 2, operations
static uint8_t op22_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op22, op22_init, sizeof(uint8_t) * 18);
static int32_t op32_init[] = {0};
model->setOperandValue(op32, op32_init, sizeof(int32_t) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type247(Type::TENSOR_QUANT8_ASYMM, {1, 1, 4, 4}, 16.0f, 0);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type246);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type247);
auto op12_tmp = model->addOperand(&type246);
auto dummy466 = model->addOperand(&type38);
auto param529 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op22_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op22, op22_init, sizeof(uint8_t) * 18);
static int32_t op32_init[] = {0};
model->setOperandValue(op32, op32_init, sizeof(int32_t) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy466_init[] = {100};
model->setOperandValue(dummy466, dummy466_init, sizeof(uint8_t) * 1);
static int32_t param529_init[] = {0};
model->setOperandValue(param529, param529_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy466, param529}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type246);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type238);
auto op12_tmp = model->addOperand(&type246);
auto dummy467 = model->addOperand(&type38);
auto param530 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op22_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op22, op22_init, sizeof(uint8_t) * 18);
static int32_t op32_init[] = {0};
model->setOperandValue(op32, op32_init, sizeof(int32_t) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy467_init[] = {100};
model->setOperandValue(dummy467, dummy467_init, sizeof(uint8_t) * 1);
static int32_t param530_init[] = {0};
model->setOperandValue(param530, param530_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy467, param530}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type247(Type::TENSOR_QUANT8_ASYMM, {1, 1, 4, 4}, 16.0f, 0);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type246);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type247);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type246);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type238);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type247(Type::TENSOR_QUANT8_ASYMM, {1, 1, 4, 4}, 16.0f, 0);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type246);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type247);
auto op12_tmp = model->addOperand(&type246);
auto dummy468 = model->addOperand(&type38);
auto param531 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type235);
auto dummy469 = model->addOperand(&type39);
auto param532 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy468_init[] = {100};
model->setOperandValue(dummy468, dummy468_init, sizeof(uint8_t) * 1);
static int32_t param531_init[] = {0};
model->setOperandValue(param531, param531_init, sizeof(int32_t) * 1);
static uint8_t dummy469_init[] = {128};
model->setOperandValue(dummy469, dummy469_init, sizeof(uint8_t) * 1);
static int32_t param532_init[] = {0};
model->setOperandValue(param532, param532_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy468, param531}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy469, param532}, {op22});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op32, op12_tmp, op22_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type246);
auto op22 = model->addOperand(&type235);
auto op32 = model->addOperand(&type236);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type238);
auto op12_tmp = model->addOperand(&type246);
auto dummy470 = model->addOperand(&type38);
auto param533 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type235);
auto dummy471 = model->addOperand(&type39);
auto param534 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy470_init[] = {100};
model->setOperandValue(dummy470, dummy470_init, sizeof(uint8_t) * 1);
static int32_t param533_init[] = {0};
model->setOperandValue(param533, param533_init, sizeof(int32_t) * 1);
static uint8_t dummy471_init[] = {128};
model->setOperandValue(dummy471, dummy471_init, sizeof(uint8_t) * 1);
static int32_t param534_init[] = {0};
model->setOperandValue(param534, param534_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy470, param533}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy471, param534}, {op22});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op32, op12_tmp, op22_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type249(Type::TENSOR_FLOAT16, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op12 = model->addOperand(&type248);
auto op22 = model->addOperand(&type240);
auto op32 = model->addOperand(&type215);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type249);
// Phase 2, operations
static _Float16 op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(_Float16) * 18);
static _Float16 op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(_Float16) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_float16_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op12 = model->addOperand(&type248);
auto op22 = model->addOperand(&type240);
auto op32 = model->addOperand(&type215);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(_Float16) * 18);
static _Float16 op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(_Float16) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_float16_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type249(Type::TENSOR_FLOAT16, {1, 1, 4, 4});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type250);
auto op22 = model->addOperand(&type240);
auto op32 = model->addOperand(&type215);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type249);
auto op12_tmp = model->addOperand(&type250);
auto dummy472 = model->addOperand(&type70);
auto param535 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(_Float16) * 18);
static _Float16 op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(_Float16) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy472_init[] = {0.0f};
model->setOperandValue(dummy472, dummy472_init, sizeof(_Float16) * 1);
static int32_t param535_init[] = {0};
model->setOperandValue(param535, param535_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy472, param535}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type250);
auto op22 = model->addOperand(&type240);
auto op32 = model->addOperand(&type215);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type68);
auto op12_tmp = model->addOperand(&type250);
auto dummy473 = model->addOperand(&type70);
auto param536 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op22_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op22, op22_init, sizeof(_Float16) * 18);
static _Float16 op32_init[] = {0.0f};
model->setOperandValue(op32, op32_init, sizeof(_Float16) * 1);
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy473_init[] = {0.0f};
model->setOperandValue(dummy473, dummy473_init, sizeof(_Float16) * 1);
static int32_t param536_init[] = {0};
model->setOperandValue(param536, param536_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy473, param536}, {op12});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type249(Type::TENSOR_FLOAT16, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type248);
auto op22 = model->addOperand(&type243);
auto op32 = model->addOperand(&type70);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type249);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type248);
auto op22 = model->addOperand(&type243);
auto op32 = model->addOperand(&type70);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12, op22, op32},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type249(Type::TENSOR_FLOAT16, {1, 1, 4, 4});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type250);
auto op22 = model->addOperand(&type243);
auto op32 = model->addOperand(&type70);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type249);
auto op12_tmp = model->addOperand(&type250);
auto dummy474 = model->addOperand(&type70);
auto param537 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type243);
auto dummy475 = model->addOperand(&type70);
auto param538 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type70);
auto dummy476 = model->addOperand(&type70);
auto param539 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy474_init[] = {0.0f};
model->setOperandValue(dummy474, dummy474_init, sizeof(_Float16) * 1);
static int32_t param537_init[] = {0};
model->setOperandValue(param537, param537_init, sizeof(int32_t) * 1);
static _Float16 dummy475_init[] = {0.0f};
model->setOperandValue(dummy475, dummy475_init, sizeof(_Float16) * 1);
static int32_t param538_init[] = {0};
model->setOperandValue(param538, param538_init, sizeof(int32_t) * 1);
static _Float16 dummy476_init[] = {0.0f};
model->setOperandValue(dummy476, dummy476_init, sizeof(_Float16) * 1);
static int32_t param539_init[] = {0};
model->setOperandValue(param539, param539_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy474, param537}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy475, param538}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy476, param539}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op12 = model->addOperand(&type250);
auto op22 = model->addOperand(&type243);
auto op32 = model->addOperand(&type70);
auto shape2 = model->addOperand(&type4);
auto param7 = model->addOperand(&type5);
auto param8 = model->addOperand(&type5);
auto param9 = model->addOperand(&type5);
auto param10 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op42 = model->addOperand(&type68);
auto op12_tmp = model->addOperand(&type250);
auto dummy477 = model->addOperand(&type70);
auto param540 = model->addOperand(&type5);
auto op22_tmp = model->addOperand(&type243);
auto dummy478 = model->addOperand(&type70);
auto param541 = model->addOperand(&type5);
auto op32_tmp = model->addOperand(&type70);
auto dummy479 = model->addOperand(&type70);
auto param542 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape2_init[] = {1, 1, 4, 4};
model->setOperandValue(shape2, shape2_init, sizeof(int32_t) * 4);
static int32_t param7_init[] = {1};
model->setOperandValue(param7, param7_init, sizeof(int32_t) * 1);
static int32_t param8_init[] = {1};
model->setOperandValue(param8, param8_init, sizeof(int32_t) * 1);
static int32_t param9_init[] = {1};
model->setOperandValue(param9, param9_init, sizeof(int32_t) * 1);
static int32_t param10_init[] = {0};
model->setOperandValue(param10, param10_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy477_init[] = {0.0f};
model->setOperandValue(dummy477, dummy477_init, sizeof(_Float16) * 1);
static int32_t param540_init[] = {0};
model->setOperandValue(param540, param540_init, sizeof(int32_t) * 1);
static _Float16 dummy478_init[] = {0.0f};
model->setOperandValue(dummy478, dummy478_init, sizeof(_Float16) * 1);
static int32_t param541_init[] = {0};
model->setOperandValue(param541, param541_init, sizeof(int32_t) * 1);
static _Float16 dummy479_init[] = {0.0f};
model->setOperandValue(dummy479, dummy479_init, sizeof(_Float16) * 1);
static int32_t param542_init[] = {0};
model->setOperandValue(param542, param542_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op12_tmp, dummy477, param540}, {op12});
model->addOperation(ANEURALNETWORKS_ADD, {op22_tmp, dummy478, param541}, {op22});
model->addOperation(ANEURALNETWORKS_ADD, {op32_tmp, dummy479, param542}, {op32});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op12, op22, op32, shape2, param7, param8, param9, param10, layout}, {op42});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op12_tmp, op22_tmp, op32_tmp},
{op42});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type14(Type::TENSOR_FLOAT32, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type14);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type14(Type::TENSOR_FLOAT32, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type14);
auto op13_tmp = model->addOperand(&type11);
auto dummy480 = model->addOperand(&type9);
auto param543 = model->addOperand(&type5);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy480_init[] = {0.0f};
model->setOperandValue(dummy480, dummy480_init, sizeof(float) * 1);
static int32_t param543_init[] = {0};
model->setOperandValue(param543, param543_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy480, param543}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
auto op13_tmp = model->addOperand(&type11);
auto dummy481 = model->addOperand(&type9);
auto param544 = model->addOperand(&type5);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy481_init[] = {0.0f};
model->setOperandValue(dummy481, dummy481_init, sizeof(float) * 1);
static int32_t param544_init[] = {0};
model->setOperandValue(param544, param544_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy481, param544}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type14(Type::TENSOR_FLOAT32, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type14);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type14(Type::TENSOR_FLOAT32, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type14);
auto op13_tmp = model->addOperand(&type11);
auto dummy482 = model->addOperand(&type9);
auto param545 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type12);
auto dummy483 = model->addOperand(&type9);
auto param546 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type9);
auto dummy484 = model->addOperand(&type9);
auto param547 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy482_init[] = {0.0f};
model->setOperandValue(dummy482, dummy482_init, sizeof(float) * 1);
static int32_t param545_init[] = {0};
model->setOperandValue(param545, param545_init, sizeof(int32_t) * 1);
static float dummy483_init[] = {0.0f};
model->setOperandValue(dummy483, dummy483_init, sizeof(float) * 1);
static int32_t param546_init[] = {0};
model->setOperandValue(param546, param546_init, sizeof(int32_t) * 1);
static float dummy484_init[] = {0.0f};
model->setOperandValue(dummy484, dummy484_init, sizeof(float) * 1);
static int32_t param547_init[] = {0};
model->setOperandValue(param547, param547_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy482, param545}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy483, param546}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy484, param547}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
auto op13_tmp = model->addOperand(&type11);
auto dummy485 = model->addOperand(&type9);
auto param548 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type12);
auto dummy486 = model->addOperand(&type9);
auto param549 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type9);
auto dummy487 = model->addOperand(&type9);
auto param550 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy485_init[] = {0.0f};
model->setOperandValue(dummy485, dummy485_init, sizeof(float) * 1);
static int32_t param548_init[] = {0};
model->setOperandValue(param548, param548_init, sizeof(int32_t) * 1);
static float dummy486_init[] = {0.0f};
model->setOperandValue(dummy486, dummy486_init, sizeof(float) * 1);
static int32_t param549_init[] = {0};
model->setOperandValue(param549, param549_init, sizeof(int32_t) * 1);
static float dummy487_init[] = {0.0f};
model->setOperandValue(dummy487, dummy487_init, sizeof(float) * 1);
static int32_t param550_init[] = {0};
model->setOperandValue(param550, param550_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy485, param548}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy486, param549}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy487, param550}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type14(Type::TENSOR_FLOAT32, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type14);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type14(Type::TENSOR_FLOAT32, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type14);
auto op13_tmp = model->addOperand(&type11);
auto dummy488 = model->addOperand(&type9);
auto param551 = model->addOperand(&type5);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy488_init[] = {0.0f};
model->setOperandValue(dummy488, dummy488_init, sizeof(float) * 1);
static int32_t param551_init[] = {0};
model->setOperandValue(param551, param551_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy488, param551}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
auto op13_tmp = model->addOperand(&type11);
auto dummy489 = model->addOperand(&type9);
auto param552 = model->addOperand(&type5);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy489_init[] = {0.0f};
model->setOperandValue(dummy489, dummy489_init, sizeof(float) * 1);
static int32_t param552_init[] = {0};
model->setOperandValue(param552, param552_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy489, param552}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type14(Type::TENSOR_FLOAT32, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type14);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type14(Type::TENSOR_FLOAT32, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type14);
auto op13_tmp = model->addOperand(&type11);
auto dummy490 = model->addOperand(&type9);
auto param553 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type12);
auto dummy491 = model->addOperand(&type9);
auto param554 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type9);
auto dummy492 = model->addOperand(&type9);
auto param555 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy490_init[] = {0.0f};
model->setOperandValue(dummy490, dummy490_init, sizeof(float) * 1);
static int32_t param553_init[] = {0};
model->setOperandValue(param553, param553_init, sizeof(int32_t) * 1);
static float dummy491_init[] = {0.0f};
model->setOperandValue(dummy491, dummy491_init, sizeof(float) * 1);
static int32_t param554_init[] = {0};
model->setOperandValue(param554, param554_init, sizeof(int32_t) * 1);
static float dummy492_init[] = {0.0f};
model->setOperandValue(dummy492, dummy492_init, sizeof(float) * 1);
static int32_t param555_init[] = {0};
model->setOperandValue(param555, param555_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy490, param553}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy491, param554}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy492, param555}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type11);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
auto op13_tmp = model->addOperand(&type11);
auto dummy493 = model->addOperand(&type9);
auto param556 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type12);
auto dummy494 = model->addOperand(&type9);
auto param557 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type9);
auto dummy495 = model->addOperand(&type9);
auto param558 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy493_init[] = {0.0f};
model->setOperandValue(dummy493, dummy493_init, sizeof(float) * 1);
static int32_t param556_init[] = {0};
model->setOperandValue(param556, param556_init, sizeof(int32_t) * 1);
static float dummy494_init[] = {0.0f};
model->setOperandValue(dummy494, dummy494_init, sizeof(float) * 1);
static int32_t param557_init[] = {0};
model->setOperandValue(param557, param557_init, sizeof(int32_t) * 1);
static float dummy495_init[] = {0.0f};
model->setOperandValue(dummy495, dummy495_init, sizeof(float) * 1);
static int32_t param558_init[] = {0};
model->setOperandValue(param558, param558_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy493, param556}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy494, param557}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy495, param558}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type251(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.25f, 10);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type253(Type::TENSOR_QUANT8_ASYMM, {1, 6, 6, 1}, 32.0f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type251);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type253);
// Phase 2, operations
static uint8_t op23_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op23, op23_init, sizeof(uint8_t) * 18);
static int32_t op33_init[] = {0};
model->setOperandValue(op33, op33_init, sizeof(int32_t) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type251(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.25f, 10);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type254(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 32.0f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type251);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type254);
// Phase 2, operations
static uint8_t op23_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op23, op23_init, sizeof(uint8_t) * 18);
static int32_t op33_init[] = {0};
model->setOperandValue(op33, op33_init, sizeof(int32_t) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type251(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.25f, 10);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type253(Type::TENSOR_QUANT8_ASYMM, {1, 6, 6, 1}, 32.0f, 80);
OperandType type255(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 10);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type251);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type253);
auto op13_tmp = model->addOperand(&type251);
auto dummy496 = model->addOperand(&type255);
auto param559 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op23_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op23, op23_init, sizeof(uint8_t) * 18);
static int32_t op33_init[] = {0};
model->setOperandValue(op33, op33_init, sizeof(int32_t) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy496_init[] = {10};
model->setOperandValue(dummy496, dummy496_init, sizeof(uint8_t) * 1);
static int32_t param559_init[] = {0};
model->setOperandValue(param559, param559_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy496, param559}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type251(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.25f, 10);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type254(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 32.0f, 80);
OperandType type255(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 10);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type251);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type254);
auto op13_tmp = model->addOperand(&type251);
auto dummy497 = model->addOperand(&type255);
auto param560 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op23_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op23, op23_init, sizeof(uint8_t) * 18);
static int32_t op33_init[] = {0};
model->setOperandValue(op33, op33_init, sizeof(int32_t) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy497_init[] = {10};
model->setOperandValue(dummy497, dummy497_init, sizeof(uint8_t) * 1);
static int32_t param560_init[] = {0};
model->setOperandValue(param560, param560_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy497, param560}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type251(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.25f, 10);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type253(Type::TENSOR_QUANT8_ASYMM, {1, 6, 6, 1}, 32.0f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type251);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type253);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type251(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.25f, 10);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type254(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 32.0f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type251);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type254);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type251(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.25f, 10);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type253(Type::TENSOR_QUANT8_ASYMM, {1, 6, 6, 1}, 32.0f, 80);
OperandType type255(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 10);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type251);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type253);
auto op13_tmp = model->addOperand(&type251);
auto dummy498 = model->addOperand(&type255);
auto param561 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type235);
auto dummy499 = model->addOperand(&type39);
auto param562 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy498_init[] = {10};
model->setOperandValue(dummy498, dummy498_init, sizeof(uint8_t) * 1);
static int32_t param561_init[] = {0};
model->setOperandValue(param561, param561_init, sizeof(int32_t) * 1);
static uint8_t dummy499_init[] = {128};
model->setOperandValue(dummy499, dummy499_init, sizeof(uint8_t) * 1);
static int32_t param562_init[] = {0};
model->setOperandValue(param562, param562_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy498, param561}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy499, param562}, {op23});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op33, op13_tmp, op23_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type251(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.25f, 10);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type254(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 32.0f, 80);
OperandType type255(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 10);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type251);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type254);
auto op13_tmp = model->addOperand(&type251);
auto dummy500 = model->addOperand(&type255);
auto param563 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type235);
auto dummy501 = model->addOperand(&type39);
auto param564 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy500_init[] = {10};
model->setOperandValue(dummy500, dummy500_init, sizeof(uint8_t) * 1);
static int32_t param563_init[] = {0};
model->setOperandValue(param563, param563_init, sizeof(int32_t) * 1);
static uint8_t dummy501_init[] = {128};
model->setOperandValue(dummy501, dummy501_init, sizeof(uint8_t) * 1);
static int32_t param564_init[] = {0};
model->setOperandValue(param564, param564_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy500, param563}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy501, param564}, {op23});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op33, op13_tmp, op23_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type256(Type::TENSOR_FLOAT16, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type239);
auto op23 = model->addOperand(&type240);
auto op33 = model->addOperand(&type215);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type256);
// Phase 2, operations
static _Float16 op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(_Float16) * 18);
static _Float16 op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(_Float16) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op13 = model->addOperand(&type239);
auto op23 = model->addOperand(&type240);
auto op33 = model->addOperand(&type215);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(_Float16) * 18);
static _Float16 op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(_Float16) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type256(Type::TENSOR_FLOAT16, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type242);
auto op23 = model->addOperand(&type240);
auto op33 = model->addOperand(&type215);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type256);
auto op13_tmp = model->addOperand(&type242);
auto dummy502 = model->addOperand(&type70);
auto param565 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(_Float16) * 18);
static _Float16 op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(_Float16) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy502_init[] = {0.0f};
model->setOperandValue(dummy502, dummy502_init, sizeof(_Float16) * 1);
static int32_t param565_init[] = {0};
model->setOperandValue(param565, param565_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy502, param565}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type242);
auto op23 = model->addOperand(&type240);
auto op33 = model->addOperand(&type215);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type68);
auto op13_tmp = model->addOperand(&type242);
auto dummy503 = model->addOperand(&type70);
auto param566 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(_Float16) * 18);
static _Float16 op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(_Float16) * 1);
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy503_init[] = {0.0f};
model->setOperandValue(dummy503, dummy503_init, sizeof(_Float16) * 1);
static int32_t param566_init[] = {0};
model->setOperandValue(param566, param566_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy503, param566}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type256(Type::TENSOR_FLOAT16, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type239);
auto op23 = model->addOperand(&type243);
auto op33 = model->addOperand(&type70);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type256);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type239);
auto op23 = model->addOperand(&type243);
auto op33 = model->addOperand(&type70);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type256(Type::TENSOR_FLOAT16, {1, 6, 6, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type242);
auto op23 = model->addOperand(&type243);
auto op33 = model->addOperand(&type70);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type256);
auto op13_tmp = model->addOperand(&type242);
auto dummy504 = model->addOperand(&type70);
auto param567 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type243);
auto dummy505 = model->addOperand(&type70);
auto param568 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type70);
auto dummy506 = model->addOperand(&type70);
auto param569 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy504_init[] = {0.0f};
model->setOperandValue(dummy504, dummy504_init, sizeof(_Float16) * 1);
static int32_t param567_init[] = {0};
model->setOperandValue(param567, param567_init, sizeof(int32_t) * 1);
static _Float16 dummy505_init[] = {0.0f};
model->setOperandValue(dummy505, dummy505_init, sizeof(_Float16) * 1);
static int32_t param568_init[] = {0};
model->setOperandValue(param568, param568_init, sizeof(int32_t) * 1);
static _Float16 dummy506_init[] = {0.0f};
model->setOperandValue(dummy506, dummy506_init, sizeof(_Float16) * 1);
static int32_t param569_init[] = {0};
model->setOperandValue(param569, param569_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy504, param567}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy505, param568}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy506, param569}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type242);
auto op23 = model->addOperand(&type243);
auto op33 = model->addOperand(&type70);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type68);
auto op13_tmp = model->addOperand(&type242);
auto dummy507 = model->addOperand(&type70);
auto param570 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type243);
auto dummy508 = model->addOperand(&type70);
auto param571 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type70);
auto dummy509 = model->addOperand(&type70);
auto param572 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 6, 6, 1};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy507_init[] = {0.0f};
model->setOperandValue(dummy507, dummy507_init, sizeof(_Float16) * 1);
static int32_t param570_init[] = {0};
model->setOperandValue(param570, param570_init, sizeof(int32_t) * 1);
static _Float16 dummy508_init[] = {0.0f};
model->setOperandValue(dummy508, dummy508_init, sizeof(_Float16) * 1);
static int32_t param571_init[] = {0};
model->setOperandValue(param571, param571_init, sizeof(int32_t) * 1);
static _Float16 dummy509_init[] = {0.0f};
model->setOperandValue(dummy509, dummy509_init, sizeof(_Float16) * 1);
static int32_t param572_init[] = {0};
model->setOperandValue(param572, param572_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy507, param570}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy508, param571}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy509, param572}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type257(Type::TENSOR_FLOAT32, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type257);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type257(Type::TENSOR_FLOAT32, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type257);
auto op13_tmp = model->addOperand(&type244);
auto dummy510 = model->addOperand(&type9);
auto param573 = model->addOperand(&type5);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy510_init[] = {0.0f};
model->setOperandValue(dummy510, dummy510_init, sizeof(float) * 1);
static int32_t param573_init[] = {0};
model->setOperandValue(param573, param573_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy510, param573}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
auto op13_tmp = model->addOperand(&type244);
auto dummy511 = model->addOperand(&type9);
auto param574 = model->addOperand(&type5);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy511_init[] = {0.0f};
model->setOperandValue(dummy511, dummy511_init, sizeof(float) * 1);
static int32_t param574_init[] = {0};
model->setOperandValue(param574, param574_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy511, param574}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type257(Type::TENSOR_FLOAT32, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type257);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type257(Type::TENSOR_FLOAT32, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type257);
auto op13_tmp = model->addOperand(&type244);
auto dummy512 = model->addOperand(&type9);
auto param575 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type12);
auto dummy513 = model->addOperand(&type9);
auto param576 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type9);
auto dummy514 = model->addOperand(&type9);
auto param577 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy512_init[] = {0.0f};
model->setOperandValue(dummy512, dummy512_init, sizeof(float) * 1);
static int32_t param575_init[] = {0};
model->setOperandValue(param575, param575_init, sizeof(int32_t) * 1);
static float dummy513_init[] = {0.0f};
model->setOperandValue(dummy513, dummy513_init, sizeof(float) * 1);
static int32_t param576_init[] = {0};
model->setOperandValue(param576, param576_init, sizeof(int32_t) * 1);
static float dummy514_init[] = {0.0f};
model->setOperandValue(dummy514, dummy514_init, sizeof(float) * 1);
static int32_t param577_init[] = {0};
model->setOperandValue(param577, param577_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy512, param575}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy513, param576}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy514, param577}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
auto op13_tmp = model->addOperand(&type244);
auto dummy515 = model->addOperand(&type9);
auto param578 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type12);
auto dummy516 = model->addOperand(&type9);
auto param579 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type9);
auto dummy517 = model->addOperand(&type9);
auto param580 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy515_init[] = {0.0f};
model->setOperandValue(dummy515, dummy515_init, sizeof(float) * 1);
static int32_t param578_init[] = {0};
model->setOperandValue(param578, param578_init, sizeof(int32_t) * 1);
static float dummy516_init[] = {0.0f};
model->setOperandValue(dummy516, dummy516_init, sizeof(float) * 1);
static int32_t param579_init[] = {0};
model->setOperandValue(param579, param579_init, sizeof(int32_t) * 1);
static float dummy517_init[] = {0.0f};
model->setOperandValue(dummy517, dummy517_init, sizeof(float) * 1);
static int32_t param580_init[] = {0};
model->setOperandValue(param580, param580_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy515, param578}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy516, param579}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy517, param580}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type257(Type::TENSOR_FLOAT32, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type257);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type257(Type::TENSOR_FLOAT32, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type257);
auto op13_tmp = model->addOperand(&type244);
auto dummy518 = model->addOperand(&type9);
auto param581 = model->addOperand(&type5);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy518_init[] = {0.0f};
model->setOperandValue(dummy518, dummy518_init, sizeof(float) * 1);
static int32_t param581_init[] = {0};
model->setOperandValue(param581, param581_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy518, param581}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
auto op13_tmp = model->addOperand(&type244);
auto dummy519 = model->addOperand(&type9);
auto param582 = model->addOperand(&type5);
// Phase 2, operations
static float op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(float) * 18);
static float op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(float) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy519_init[] = {0.0f};
model->setOperandValue(dummy519, dummy519_init, sizeof(float) * 1);
static int32_t param582_init[] = {0};
model->setOperandValue(param582, param582_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy519, param582}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type257(Type::TENSOR_FLOAT32, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type257);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type257(Type::TENSOR_FLOAT32, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type257);
auto op13_tmp = model->addOperand(&type244);
auto dummy520 = model->addOperand(&type9);
auto param583 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type12);
auto dummy521 = model->addOperand(&type9);
auto param584 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type9);
auto dummy522 = model->addOperand(&type9);
auto param585 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy520_init[] = {0.0f};
model->setOperandValue(dummy520, dummy520_init, sizeof(float) * 1);
static int32_t param583_init[] = {0};
model->setOperandValue(param583, param583_init, sizeof(int32_t) * 1);
static float dummy521_init[] = {0.0f};
model->setOperandValue(dummy521, dummy521_init, sizeof(float) * 1);
static int32_t param584_init[] = {0};
model->setOperandValue(param584, param584_init, sizeof(int32_t) * 1);
static float dummy522_init[] = {0.0f};
model->setOperandValue(dummy522, dummy522_init, sizeof(float) * 1);
static int32_t param585_init[] = {0};
model->setOperandValue(param585, param585_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy520, param583}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy521, param584}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy522, param585}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type244);
auto op23 = model->addOperand(&type12);
auto op33 = model->addOperand(&type9);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type27);
auto op13_tmp = model->addOperand(&type244);
auto dummy523 = model->addOperand(&type9);
auto param586 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type12);
auto dummy524 = model->addOperand(&type9);
auto param587 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type9);
auto dummy525 = model->addOperand(&type9);
auto param588 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy523_init[] = {0.0f};
model->setOperandValue(dummy523, dummy523_init, sizeof(float) * 1);
static int32_t param586_init[] = {0};
model->setOperandValue(param586, param586_init, sizeof(int32_t) * 1);
static float dummy524_init[] = {0.0f};
model->setOperandValue(dummy524, dummy524_init, sizeof(float) * 1);
static int32_t param587_init[] = {0};
model->setOperandValue(param587, param587_init, sizeof(int32_t) * 1);
static float dummy525_init[] = {0.0f};
model->setOperandValue(dummy525, dummy525_init, sizeof(float) * 1);
static int32_t param588_init[] = {0};
model->setOperandValue(param588, param588_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy523, param586}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy524, param587}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy525, param588}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type258(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.25f, 10);
OperandType type259(Type::TENSOR_QUANT8_ASYMM, {1, 1, 6, 6}, 32.0f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type258);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type259);
// Phase 2, operations
static uint8_t op23_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op23, op23_init, sizeof(uint8_t) * 18);
static int32_t op33_init[] = {0};
model->setOperandValue(op33, op33_init, sizeof(int32_t) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type254(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 32.0f, 80);
OperandType type258(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.25f, 10);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type258);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type254);
// Phase 2, operations
static uint8_t op23_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op23, op23_init, sizeof(uint8_t) * 18);
static int32_t op33_init[] = {0};
model->setOperandValue(op33, op33_init, sizeof(int32_t) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type255(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 10);
OperandType type258(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.25f, 10);
OperandType type259(Type::TENSOR_QUANT8_ASYMM, {1, 1, 6, 6}, 32.0f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type258);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type259);
auto op13_tmp = model->addOperand(&type258);
auto dummy526 = model->addOperand(&type255);
auto param589 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op23_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op23, op23_init, sizeof(uint8_t) * 18);
static int32_t op33_init[] = {0};
model->setOperandValue(op33, op33_init, sizeof(int32_t) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy526_init[] = {10};
model->setOperandValue(dummy526, dummy526_init, sizeof(uint8_t) * 1);
static int32_t param589_init[] = {0};
model->setOperandValue(param589, param589_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy526, param589}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type254(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 32.0f, 80);
OperandType type255(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 10);
OperandType type258(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.25f, 10);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type258);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type254);
auto op13_tmp = model->addOperand(&type258);
auto dummy527 = model->addOperand(&type255);
auto param590 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op23_init[] = {130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164};
model->setOperandValue(op23, op23_init, sizeof(uint8_t) * 18);
static int32_t op33_init[] = {0};
model->setOperandValue(op33, op33_init, sizeof(int32_t) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy527_init[] = {10};
model->setOperandValue(dummy527, dummy527_init, sizeof(uint8_t) * 1);
static int32_t param590_init[] = {0};
model->setOperandValue(param590, param590_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy527, param590}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type258(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.25f, 10);
OperandType type259(Type::TENSOR_QUANT8_ASYMM, {1, 1, 6, 6}, 32.0f, 80);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type258);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type259);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type254(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 32.0f, 80);
OperandType type258(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.25f, 10);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type258);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type254);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type255(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 10);
OperandType type258(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.25f, 10);
OperandType type259(Type::TENSOR_QUANT8_ASYMM, {1, 1, 6, 6}, 32.0f, 80);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type258);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type259);
auto op13_tmp = model->addOperand(&type258);
auto dummy528 = model->addOperand(&type255);
auto param591 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type235);
auto dummy529 = model->addOperand(&type39);
auto param592 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy528_init[] = {10};
model->setOperandValue(dummy528, dummy528_init, sizeof(uint8_t) * 1);
static int32_t param591_init[] = {0};
model->setOperandValue(param591, param591_init, sizeof(int32_t) * 1);
static uint8_t dummy529_init[] = {128};
model->setOperandValue(dummy529, dummy529_init, sizeof(uint8_t) * 1);
static int32_t param592_init[] = {0};
model->setOperandValue(param592, param592_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy528, param591}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy529, param592}, {op23});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op33, op13_tmp, op23_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type235(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.5f, 128);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type254(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 32.0f, 80);
OperandType type255(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 10);
OperandType type258(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.25f, 10);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type258);
auto op23 = model->addOperand(&type235);
auto op33 = model->addOperand(&type252);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type254);
auto op13_tmp = model->addOperand(&type258);
auto dummy530 = model->addOperand(&type255);
auto param593 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type235);
auto dummy531 = model->addOperand(&type39);
auto param594 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy530_init[] = {10};
model->setOperandValue(dummy530, dummy530_init, sizeof(uint8_t) * 1);
static int32_t param593_init[] = {0};
model->setOperandValue(param593, param593_init, sizeof(int32_t) * 1);
static uint8_t dummy531_init[] = {128};
model->setOperandValue(dummy531, dummy531_init, sizeof(uint8_t) * 1);
static int32_t param594_init[] = {0};
model->setOperandValue(param594, param594_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy530, param593}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy531, param594}, {op23});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op33, op13_tmp, op23_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type260(Type::TENSOR_FLOAT16, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op13 = model->addOperand(&type248);
auto op23 = model->addOperand(&type240);
auto op33 = model->addOperand(&type215);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type260);
// Phase 2, operations
static _Float16 op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(_Float16) * 18);
static _Float16 op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(_Float16) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_float16_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op13 = model->addOperand(&type248);
auto op23 = model->addOperand(&type240);
auto op33 = model->addOperand(&type215);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(_Float16) * 18);
static _Float16 op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(_Float16) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_float16_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type260(Type::TENSOR_FLOAT16, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type250);
auto op23 = model->addOperand(&type240);
auto op33 = model->addOperand(&type215);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type260);
auto op13_tmp = model->addOperand(&type250);
auto dummy532 = model->addOperand(&type70);
auto param595 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(_Float16) * 18);
static _Float16 op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(_Float16) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy532_init[] = {0.0f};
model->setOperandValue(dummy532, dummy532_init, sizeof(_Float16) * 1);
static int32_t param595_init[] = {0};
model->setOperandValue(param595, param595_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy532, param595}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type250);
auto op23 = model->addOperand(&type240);
auto op33 = model->addOperand(&type215);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type68);
auto op13_tmp = model->addOperand(&type250);
auto dummy533 = model->addOperand(&type70);
auto param596 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op23_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op23, op23_init, sizeof(_Float16) * 18);
static _Float16 op33_init[] = {0.0f};
model->setOperandValue(op33, op33_init, sizeof(_Float16) * 1);
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy533_init[] = {0.0f};
model->setOperandValue(dummy533, dummy533_init, sizeof(_Float16) * 1);
static int32_t param596_init[] = {0};
model->setOperandValue(param596, param596_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy533, param596}, {op13});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type260(Type::TENSOR_FLOAT16, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type248);
auto op23 = model->addOperand(&type243);
auto op33 = model->addOperand(&type70);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type260);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type248);
auto op23 = model->addOperand(&type243);
auto op33 = model->addOperand(&type70);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13, op23, op33},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type260(Type::TENSOR_FLOAT16, {1, 1, 6, 6});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type250);
auto op23 = model->addOperand(&type243);
auto op33 = model->addOperand(&type70);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type260);
auto op13_tmp = model->addOperand(&type250);
auto dummy534 = model->addOperand(&type70);
auto param597 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type243);
auto dummy535 = model->addOperand(&type70);
auto param598 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type70);
auto dummy536 = model->addOperand(&type70);
auto param599 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy534_init[] = {0.0f};
model->setOperandValue(dummy534, dummy534_init, sizeof(_Float16) * 1);
static int32_t param597_init[] = {0};
model->setOperandValue(param597, param597_init, sizeof(int32_t) * 1);
static _Float16 dummy535_init[] = {0.0f};
model->setOperandValue(dummy535, dummy535_init, sizeof(_Float16) * 1);
static int32_t param598_init[] = {0};
model->setOperandValue(param598, param598_init, sizeof(int32_t) * 1);
static _Float16 dummy536_init[] = {0.0f};
model->setOperandValue(dummy536, dummy536_init, sizeof(_Float16) * 1);
static int32_t param599_init[] = {0};
model->setOperandValue(param599, param599_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy534, param597}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy535, param598}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy536, param599}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op13 = model->addOperand(&type250);
auto op23 = model->addOperand(&type243);
auto op33 = model->addOperand(&type70);
auto shape3 = model->addOperand(&type4);
auto param11 = model->addOperand(&type5);
auto param12 = model->addOperand(&type5);
auto param13 = model->addOperand(&type5);
auto param14 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op43 = model->addOperand(&type68);
auto op13_tmp = model->addOperand(&type250);
auto dummy537 = model->addOperand(&type70);
auto param600 = model->addOperand(&type5);
auto op23_tmp = model->addOperand(&type243);
auto dummy538 = model->addOperand(&type70);
auto param601 = model->addOperand(&type5);
auto op33_tmp = model->addOperand(&type70);
auto dummy539 = model->addOperand(&type70);
auto param602 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape3_init[] = {1, 1, 6, 6};
model->setOperandValue(shape3, shape3_init, sizeof(int32_t) * 4);
static int32_t param11_init[] = {2};
model->setOperandValue(param11, param11_init, sizeof(int32_t) * 1);
static int32_t param12_init[] = {1};
model->setOperandValue(param12, param12_init, sizeof(int32_t) * 1);
static int32_t param13_init[] = {1};
model->setOperandValue(param13, param13_init, sizeof(int32_t) * 1);
static int32_t param14_init[] = {0};
model->setOperandValue(param14, param14_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy537_init[] = {0.0f};
model->setOperandValue(dummy537, dummy537_init, sizeof(_Float16) * 1);
static int32_t param600_init[] = {0};
model->setOperandValue(param600, param600_init, sizeof(int32_t) * 1);
static _Float16 dummy538_init[] = {0.0f};
model->setOperandValue(dummy538, dummy538_init, sizeof(_Float16) * 1);
static int32_t param601_init[] = {0};
model->setOperandValue(param601, param601_init, sizeof(int32_t) * 1);
static _Float16 dummy539_init[] = {0.0f};
model->setOperandValue(dummy539, dummy539_init, sizeof(_Float16) * 1);
static int32_t param602_init[] = {0};
model->setOperandValue(param602, param602_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op13_tmp, dummy537, param600}, {op13});
model->addOperation(ANEURALNETWORKS_ADD, {op23_tmp, dummy538, param601}, {op23});
model->addOperation(ANEURALNETWORKS_ADD, {op33_tmp, dummy539, param602}, {op33});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op13, op23, op33, shape3, param11, param12, param13, param14, layout}, {op43});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op13_tmp, op23_tmp, op33_tmp},
{op43});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_3(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type8);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type8);
auto op14_tmp = model->addOperand(&type11);
auto dummy540 = model->addOperand(&type9);
auto param603 = model->addOperand(&type5);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy540_init[] = {0.0f};
model->setOperandValue(dummy540, dummy540_init, sizeof(float) * 1);
static int32_t param603_init[] = {0};
model->setOperandValue(param603, param603_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy540, param603}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
auto op14_tmp = model->addOperand(&type11);
auto dummy541 = model->addOperand(&type9);
auto param604 = model->addOperand(&type5);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy541_init[] = {0.0f};
model->setOperandValue(dummy541, dummy541_init, sizeof(float) * 1);
static int32_t param604_init[] = {0};
model->setOperandValue(param604, param604_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy541, param604}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type8);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type8);
auto op14_tmp = model->addOperand(&type11);
auto dummy542 = model->addOperand(&type9);
auto param605 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type12);
auto dummy543 = model->addOperand(&type9);
auto param606 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type9);
auto dummy544 = model->addOperand(&type9);
auto param607 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy542_init[] = {0.0f};
model->setOperandValue(dummy542, dummy542_init, sizeof(float) * 1);
static int32_t param605_init[] = {0};
model->setOperandValue(param605, param605_init, sizeof(int32_t) * 1);
static float dummy543_init[] = {0.0f};
model->setOperandValue(dummy543, dummy543_init, sizeof(float) * 1);
static int32_t param606_init[] = {0};
model->setOperandValue(param606, param606_init, sizeof(int32_t) * 1);
static float dummy544_init[] = {0.0f};
model->setOperandValue(dummy544, dummy544_init, sizeof(float) * 1);
static int32_t param607_init[] = {0};
model->setOperandValue(param607, param607_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy542, param605}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy543, param606}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy544, param607}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
auto op14_tmp = model->addOperand(&type11);
auto dummy545 = model->addOperand(&type9);
auto param608 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type12);
auto dummy546 = model->addOperand(&type9);
auto param609 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type9);
auto dummy547 = model->addOperand(&type9);
auto param610 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy545_init[] = {0.0f};
model->setOperandValue(dummy545, dummy545_init, sizeof(float) * 1);
static int32_t param608_init[] = {0};
model->setOperandValue(param608, param608_init, sizeof(int32_t) * 1);
static float dummy546_init[] = {0.0f};
model->setOperandValue(dummy546, dummy546_init, sizeof(float) * 1);
static int32_t param609_init[] = {0};
model->setOperandValue(param609, param609_init, sizeof(int32_t) * 1);
static float dummy547_init[] = {0.0f};
model->setOperandValue(dummy547, dummy547_init, sizeof(float) * 1);
static int32_t param610_init[] = {0};
model->setOperandValue(param610, param610_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy545, param608}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy546, param609}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy547, param610}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type8);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type8);
auto op14_tmp = model->addOperand(&type11);
auto dummy548 = model->addOperand(&type9);
auto param611 = model->addOperand(&type5);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy548_init[] = {0.0f};
model->setOperandValue(dummy548, dummy548_init, sizeof(float) * 1);
static int32_t param611_init[] = {0};
model->setOperandValue(param611, param611_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy548, param611}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
auto op14_tmp = model->addOperand(&type11);
auto dummy549 = model->addOperand(&type9);
auto param612 = model->addOperand(&type5);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy549_init[] = {0.0f};
model->setOperandValue(dummy549, dummy549_init, sizeof(float) * 1);
static int32_t param612_init[] = {0};
model->setOperandValue(param612, param612_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy549, param612}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type8);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type8);
auto op14_tmp = model->addOperand(&type11);
auto dummy550 = model->addOperand(&type9);
auto param613 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type12);
auto dummy551 = model->addOperand(&type9);
auto param614 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type9);
auto dummy552 = model->addOperand(&type9);
auto param615 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy550_init[] = {0.0f};
model->setOperandValue(dummy550, dummy550_init, sizeof(float) * 1);
static int32_t param613_init[] = {0};
model->setOperandValue(param613, param613_init, sizeof(int32_t) * 1);
static float dummy551_init[] = {0.0f};
model->setOperandValue(dummy551, dummy551_init, sizeof(float) * 1);
static int32_t param614_init[] = {0};
model->setOperandValue(param614, param614_init, sizeof(int32_t) * 1);
static float dummy552_init[] = {0.0f};
model->setOperandValue(dummy552, dummy552_init, sizeof(float) * 1);
static int32_t param615_init[] = {0};
model->setOperandValue(param615, param615_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy550, param613}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy551, param614}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy552, param615}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type11(Type::TENSOR_FLOAT32, {1, 4, 4, 2});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type11);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
auto op14_tmp = model->addOperand(&type11);
auto dummy553 = model->addOperand(&type9);
auto param616 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type12);
auto dummy554 = model->addOperand(&type9);
auto param617 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type9);
auto dummy555 = model->addOperand(&type9);
auto param618 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy553_init[] = {0.0f};
model->setOperandValue(dummy553, dummy553_init, sizeof(float) * 1);
static int32_t param616_init[] = {0};
model->setOperandValue(param616, param616_init, sizeof(int32_t) * 1);
static float dummy554_init[] = {0.0f};
model->setOperandValue(dummy554, dummy554_init, sizeof(float) * 1);
static int32_t param617_init[] = {0};
model->setOperandValue(param617, param617_init, sizeof(int32_t) * 1);
static float dummy555_init[] = {0.0f};
model->setOperandValue(dummy555, dummy555_init, sizeof(float) * 1);
static int32_t param618_init[] = {0};
model->setOperandValue(param618, param618_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy553, param616}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy554, param617}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy555, param618}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type262(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 20.0f, 50);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type234);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type262);
// Phase 2, operations
static uint8_t op24_init[] = {132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200};
model->setOperandValue(op24, op24_init, sizeof(uint8_t) * 18);
static int32_t op34_init[] = {0};
model->setOperandValue(op34, op34_init, sizeof(int32_t) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type234);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type200);
// Phase 2, operations
static uint8_t op24_init[] = {132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200};
model->setOperandValue(op24, op24_init, sizeof(uint8_t) * 18);
static int32_t op34_init[] = {0};
model->setOperandValue(op34, op34_init, sizeof(int32_t) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type262(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 20.0f, 50);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type234);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type262);
auto op14_tmp = model->addOperand(&type234);
auto dummy556 = model->addOperand(&type38);
auto param619 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op24_init[] = {132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200};
model->setOperandValue(op24, op24_init, sizeof(uint8_t) * 18);
static int32_t op34_init[] = {0};
model->setOperandValue(op34, op34_init, sizeof(int32_t) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy556_init[] = {100};
model->setOperandValue(dummy556, dummy556_init, sizeof(uint8_t) * 1);
static int32_t param619_init[] = {0};
model->setOperandValue(param619, param619_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy556, param619}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type234);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type200);
auto op14_tmp = model->addOperand(&type234);
auto dummy557 = model->addOperand(&type38);
auto param620 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op24_init[] = {132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200};
model->setOperandValue(op24, op24_init, sizeof(uint8_t) * 18);
static int32_t op34_init[] = {0};
model->setOperandValue(op34, op34_init, sizeof(int32_t) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy557_init[] = {100};
model->setOperandValue(dummy557, dummy557_init, sizeof(uint8_t) * 1);
static int32_t param620_init[] = {0};
model->setOperandValue(param620, param620_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy557, param620}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type262(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 20.0f, 50);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type234);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type262);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type234);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type200);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type202(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 128);
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type262(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 20.0f, 50);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type234);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type262);
auto op14_tmp = model->addOperand(&type234);
auto dummy558 = model->addOperand(&type38);
auto param621 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type261);
auto dummy559 = model->addOperand(&type202);
auto param622 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy558_init[] = {100};
model->setOperandValue(dummy558, dummy558_init, sizeof(uint8_t) * 1);
static int32_t param621_init[] = {0};
model->setOperandValue(param621, param621_init, sizeof(int32_t) * 1);
static uint8_t dummy559_init[] = {128};
model->setOperandValue(dummy559, dummy559_init, sizeof(uint8_t) * 1);
static int32_t param622_init[] = {0};
model->setOperandValue(param622, param622_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy558, param621}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy559, param622}, {op24});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op34, op14_tmp, op24_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type202(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 128);
OperandType type234(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 2}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type234);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type200);
auto op14_tmp = model->addOperand(&type234);
auto dummy560 = model->addOperand(&type38);
auto param623 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type261);
auto dummy561 = model->addOperand(&type202);
auto param624 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy560_init[] = {100};
model->setOperandValue(dummy560, dummy560_init, sizeof(uint8_t) * 1);
static int32_t param623_init[] = {0};
model->setOperandValue(param623, param623_init, sizeof(int32_t) * 1);
static uint8_t dummy561_init[] = {128};
model->setOperandValue(dummy561, dummy561_init, sizeof(uint8_t) * 1);
static int32_t param624_init[] = {0};
model->setOperandValue(param624, param624_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy560, param623}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy561, param624}, {op24});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op34, op14_tmp, op24_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type239);
auto op24 = model->addOperand(&type240);
auto op34 = model->addOperand(&type215);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type214);
// Phase 2, operations
static _Float16 op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(_Float16) * 18);
static _Float16 op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(_Float16) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op14 = model->addOperand(&type239);
auto op24 = model->addOperand(&type240);
auto op34 = model->addOperand(&type215);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(_Float16) * 18);
static _Float16 op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(_Float16) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type242);
auto op24 = model->addOperand(&type240);
auto op34 = model->addOperand(&type215);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type214);
auto op14_tmp = model->addOperand(&type242);
auto dummy562 = model->addOperand(&type70);
auto param625 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(_Float16) * 18);
static _Float16 op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(_Float16) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy562_init[] = {0.0f};
model->setOperandValue(dummy562, dummy562_init, sizeof(_Float16) * 1);
static int32_t param625_init[] = {0};
model->setOperandValue(param625, param625_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy562, param625}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type242);
auto op24 = model->addOperand(&type240);
auto op34 = model->addOperand(&type215);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type68);
auto op14_tmp = model->addOperand(&type242);
auto dummy563 = model->addOperand(&type70);
auto param626 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(_Float16) * 18);
static _Float16 op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(_Float16) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy563_init[] = {0.0f};
model->setOperandValue(dummy563, dummy563_init, sizeof(_Float16) * 1);
static int32_t param626_init[] = {0};
model->setOperandValue(param626, param626_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy563, param626}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type239);
auto op24 = model->addOperand(&type243);
auto op34 = model->addOperand(&type70);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type214);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type239(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type239);
auto op24 = model->addOperand(&type243);
auto op34 = model->addOperand(&type70);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type68);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type242);
auto op24 = model->addOperand(&type243);
auto op34 = model->addOperand(&type70);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type214);
auto op14_tmp = model->addOperand(&type242);
auto dummy564 = model->addOperand(&type70);
auto param627 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type243);
auto dummy565 = model->addOperand(&type70);
auto param628 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type70);
auto dummy566 = model->addOperand(&type70);
auto param629 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy564_init[] = {0.0f};
model->setOperandValue(dummy564, dummy564_init, sizeof(_Float16) * 1);
static int32_t param627_init[] = {0};
model->setOperandValue(param627, param627_init, sizeof(int32_t) * 1);
static _Float16 dummy565_init[] = {0.0f};
model->setOperandValue(dummy565, dummy565_init, sizeof(_Float16) * 1);
static int32_t param628_init[] = {0};
model->setOperandValue(param628, param628_init, sizeof(int32_t) * 1);
static _Float16 dummy566_init[] = {0.0f};
model->setOperandValue(dummy566, dummy566_init, sizeof(_Float16) * 1);
static int32_t param629_init[] = {0};
model->setOperandValue(param629, param629_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy564, param627}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy565, param628}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy566, param629}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type242(Type::TENSOR_FLOAT16, {1, 4, 4, 2});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type242);
auto op24 = model->addOperand(&type243);
auto op34 = model->addOperand(&type70);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type68);
auto op14_tmp = model->addOperand(&type242);
auto dummy567 = model->addOperand(&type70);
auto param630 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type243);
auto dummy568 = model->addOperand(&type70);
auto param631 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type70);
auto dummy569 = model->addOperand(&type70);
auto param632 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy567_init[] = {0.0f};
model->setOperandValue(dummy567, dummy567_init, sizeof(_Float16) * 1);
static int32_t param630_init[] = {0};
model->setOperandValue(param630, param630_init, sizeof(int32_t) * 1);
static _Float16 dummy568_init[] = {0.0f};
model->setOperandValue(dummy568, dummy568_init, sizeof(_Float16) * 1);
static int32_t param631_init[] = {0};
model->setOperandValue(param631, param631_init, sizeof(int32_t) * 1);
static _Float16 dummy569_init[] = {0.0f};
model->setOperandValue(dummy569, dummy569_init, sizeof(_Float16) * 1);
static int32_t param632_init[] = {0};
model->setOperandValue(param632, param632_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy567, param630}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy568, param631}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy569, param632}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type263(Type::TENSOR_FLOAT32, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type263);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type263(Type::TENSOR_FLOAT32, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type263);
auto op14_tmp = model->addOperand(&type244);
auto dummy570 = model->addOperand(&type9);
auto param633 = model->addOperand(&type5);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy570_init[] = {0.0f};
model->setOperandValue(dummy570, dummy570_init, sizeof(float) * 1);
static int32_t param633_init[] = {0};
model->setOperandValue(param633, param633_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy570, param633}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
auto op14_tmp = model->addOperand(&type244);
auto dummy571 = model->addOperand(&type9);
auto param634 = model->addOperand(&type5);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy571_init[] = {0.0f};
model->setOperandValue(dummy571, dummy571_init, sizeof(float) * 1);
static int32_t param634_init[] = {0};
model->setOperandValue(param634, param634_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy571, param634}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type263(Type::TENSOR_FLOAT32, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type263);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type263(Type::TENSOR_FLOAT32, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type263);
auto op14_tmp = model->addOperand(&type244);
auto dummy572 = model->addOperand(&type9);
auto param635 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type12);
auto dummy573 = model->addOperand(&type9);
auto param636 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type9);
auto dummy574 = model->addOperand(&type9);
auto param637 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy572_init[] = {0.0f};
model->setOperandValue(dummy572, dummy572_init, sizeof(float) * 1);
static int32_t param635_init[] = {0};
model->setOperandValue(param635, param635_init, sizeof(int32_t) * 1);
static float dummy573_init[] = {0.0f};
model->setOperandValue(dummy573, dummy573_init, sizeof(float) * 1);
static int32_t param636_init[] = {0};
model->setOperandValue(param636, param636_init, sizeof(int32_t) * 1);
static float dummy574_init[] = {0.0f};
model->setOperandValue(dummy574, dummy574_init, sizeof(float) * 1);
static int32_t param637_init[] = {0};
model->setOperandValue(param637, param637_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy572, param635}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy573, param636}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy574, param637}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
auto op14_tmp = model->addOperand(&type244);
auto dummy575 = model->addOperand(&type9);
auto param638 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type12);
auto dummy576 = model->addOperand(&type9);
auto param639 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type9);
auto dummy577 = model->addOperand(&type9);
auto param640 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy575_init[] = {0.0f};
model->setOperandValue(dummy575, dummy575_init, sizeof(float) * 1);
static int32_t param638_init[] = {0};
model->setOperandValue(param638, param638_init, sizeof(int32_t) * 1);
static float dummy576_init[] = {0.0f};
model->setOperandValue(dummy576, dummy576_init, sizeof(float) * 1);
static int32_t param639_init[] = {0};
model->setOperandValue(param639, param639_init, sizeof(int32_t) * 1);
static float dummy577_init[] = {0.0f};
model->setOperandValue(dummy577, dummy577_init, sizeof(float) * 1);
static int32_t param640_init[] = {0};
model->setOperandValue(param640, param640_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy575, param638}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy576, param639}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy577, param640}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type263(Type::TENSOR_FLOAT32, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type263);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type263(Type::TENSOR_FLOAT32, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type263);
auto op14_tmp = model->addOperand(&type244);
auto dummy578 = model->addOperand(&type9);
auto param641 = model->addOperand(&type5);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy578_init[] = {0.0f};
model->setOperandValue(dummy578, dummy578_init, sizeof(float) * 1);
static int32_t param641_init[] = {0};
model->setOperandValue(param641, param641_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy578, param641}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
auto op14_tmp = model->addOperand(&type244);
auto dummy579 = model->addOperand(&type9);
auto param642 = model->addOperand(&type5);
// Phase 2, operations
static float op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(float) * 18);
static float op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(float) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy579_init[] = {0.0f};
model->setOperandValue(dummy579, dummy579_init, sizeof(float) * 1);
static int32_t param642_init[] = {0};
model->setOperandValue(param642, param642_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy579, param642}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type263(Type::TENSOR_FLOAT32, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type263);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type263(Type::TENSOR_FLOAT32, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type263);
auto op14_tmp = model->addOperand(&type244);
auto dummy580 = model->addOperand(&type9);
auto param643 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type12);
auto dummy581 = model->addOperand(&type9);
auto param644 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type9);
auto dummy582 = model->addOperand(&type9);
auto param645 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy580_init[] = {0.0f};
model->setOperandValue(dummy580, dummy580_init, sizeof(float) * 1);
static int32_t param643_init[] = {0};
model->setOperandValue(param643, param643_init, sizeof(int32_t) * 1);
static float dummy581_init[] = {0.0f};
model->setOperandValue(dummy581, dummy581_init, sizeof(float) * 1);
static int32_t param644_init[] = {0};
model->setOperandValue(param644, param644_init, sizeof(int32_t) * 1);
static float dummy582_init[] = {0.0f};
model->setOperandValue(dummy582, dummy582_init, sizeof(float) * 1);
static int32_t param645_init[] = {0};
model->setOperandValue(param645, param645_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy580, param643}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy581, param644}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy582, param645}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type12(Type::TENSOR_FLOAT32, {1, 3, 3, 2});
OperandType type244(Type::TENSOR_FLOAT32, {1, 2, 4, 4});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type244);
auto op24 = model->addOperand(&type12);
auto op34 = model->addOperand(&type9);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type27);
auto op14_tmp = model->addOperand(&type244);
auto dummy583 = model->addOperand(&type9);
auto param646 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type12);
auto dummy584 = model->addOperand(&type9);
auto param647 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type9);
auto dummy585 = model->addOperand(&type9);
auto param648 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy583_init[] = {0.0f};
model->setOperandValue(dummy583, dummy583_init, sizeof(float) * 1);
static int32_t param646_init[] = {0};
model->setOperandValue(param646, param646_init, sizeof(int32_t) * 1);
static float dummy584_init[] = {0.0f};
model->setOperandValue(dummy584, dummy584_init, sizeof(float) * 1);
static int32_t param647_init[] = {0};
model->setOperandValue(param647, param647_init, sizeof(int32_t) * 1);
static float dummy585_init[] = {0.0f};
model->setOperandValue(dummy585, dummy585_init, sizeof(float) * 1);
static int32_t param648_init[] = {0};
model->setOperandValue(param648, param648_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy583, param646}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy584, param647}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy585, param648}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type264(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 3}, 20.0f, 50);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type246);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type264);
// Phase 2, operations
static uint8_t op24_init[] = {132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200};
model->setOperandValue(op24, op24_init, sizeof(uint8_t) * 18);
static int32_t op34_init[] = {0};
model->setOperandValue(op34, op34_init, sizeof(int32_t) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type246);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type200);
// Phase 2, operations
static uint8_t op24_init[] = {132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200};
model->setOperandValue(op24, op24_init, sizeof(uint8_t) * 18);
static int32_t op34_init[] = {0};
model->setOperandValue(op34, op34_init, sizeof(int32_t) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type264(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 3}, 20.0f, 50);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type246);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type264);
auto op14_tmp = model->addOperand(&type246);
auto dummy586 = model->addOperand(&type38);
auto param649 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op24_init[] = {132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200};
model->setOperandValue(op24, op24_init, sizeof(uint8_t) * 18);
static int32_t op34_init[] = {0};
model->setOperandValue(op34, op34_init, sizeof(int32_t) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy586_init[] = {100};
model->setOperandValue(dummy586, dummy586_init, sizeof(uint8_t) * 1);
static int32_t param649_init[] = {0};
model->setOperandValue(param649, param649_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy586, param649}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type246);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type200);
auto op14_tmp = model->addOperand(&type246);
auto dummy587 = model->addOperand(&type38);
auto param650 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op24_init[] = {132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200};
model->setOperandValue(op24, op24_init, sizeof(uint8_t) * 18);
static int32_t op34_init[] = {0};
model->setOperandValue(op34, op34_init, sizeof(int32_t) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy587_init[] = {100};
model->setOperandValue(dummy587, dummy587_init, sizeof(uint8_t) * 1);
static int32_t param650_init[] = {0};
model->setOperandValue(param650, param650_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy587, param650}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type264(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 3}, 20.0f, 50);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type246);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type264);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type246);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type200);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type202(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 128);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type264(Type::TENSOR_QUANT8_ASYMM, {1, 1, 3, 3}, 20.0f, 50);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type246);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type264);
auto op14_tmp = model->addOperand(&type246);
auto dummy588 = model->addOperand(&type38);
auto param651 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type261);
auto dummy589 = model->addOperand(&type202);
auto param652 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy588_init[] = {100};
model->setOperandValue(dummy588, dummy588_init, sizeof(uint8_t) * 1);
static int32_t param651_init[] = {0};
model->setOperandValue(param651, param651_init, sizeof(int32_t) * 1);
static uint8_t dummy589_init[] = {128};
model->setOperandValue(dummy589, dummy589_init, sizeof(uint8_t) * 1);
static int32_t param652_init[] = {0};
model->setOperandValue(param652, param652_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy588, param651}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy589, param652}, {op24});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op34, op14_tmp, op24_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type200(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 20.0f, 50);
OperandType type202(Type::TENSOR_QUANT8_ASYMM, {1}, 0.25f, 128);
OperandType type246(Type::TENSOR_QUANT8_ASYMM, {1, 2, 4, 4}, 0.5f, 100);
OperandType type252(Type::TENSOR_INT32, {1}, 0.125f, 0);
OperandType type261(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 2}, 0.25f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type246);
auto op24 = model->addOperand(&type261);
auto op34 = model->addOperand(&type252);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type200);
auto op14_tmp = model->addOperand(&type246);
auto dummy590 = model->addOperand(&type38);
auto param653 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type261);
auto dummy591 = model->addOperand(&type202);
auto param654 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy590_init[] = {100};
model->setOperandValue(dummy590, dummy590_init, sizeof(uint8_t) * 1);
static int32_t param653_init[] = {0};
model->setOperandValue(param653, param653_init, sizeof(int32_t) * 1);
static uint8_t dummy591_init[] = {128};
model->setOperandValue(dummy591, dummy591_init, sizeof(uint8_t) * 1);
static int32_t param654_init[] = {0};
model->setOperandValue(param654, param654_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy590, param653}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy591, param654}, {op24});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op34, op14_tmp, op24_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type265(Type::TENSOR_FLOAT16, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op14 = model->addOperand(&type248);
auto op24 = model->addOperand(&type240);
auto op34 = model->addOperand(&type215);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type265);
// Phase 2, operations
static _Float16 op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(_Float16) * 18);
static _Float16 op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(_Float16) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_float16_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op14 = model->addOperand(&type248);
auto op24 = model->addOperand(&type240);
auto op34 = model->addOperand(&type215);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(_Float16) * 18);
static _Float16 op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(_Float16) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_float16_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type265(Type::TENSOR_FLOAT16, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type250);
auto op24 = model->addOperand(&type240);
auto op34 = model->addOperand(&type215);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type265);
auto op14_tmp = model->addOperand(&type250);
auto dummy592 = model->addOperand(&type70);
auto param655 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(_Float16) * 18);
static _Float16 op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(_Float16) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy592_init[] = {0.0f};
model->setOperandValue(dummy592, dummy592_init, sizeof(_Float16) * 1);
static int32_t param655_init[] = {0};
model->setOperandValue(param655, param655_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy592, param655}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type240(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type250);
auto op24 = model->addOperand(&type240);
auto op34 = model->addOperand(&type215);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type68);
auto op14_tmp = model->addOperand(&type250);
auto dummy593 = model->addOperand(&type70);
auto param656 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op24_init[] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f};
model->setOperandValue(op24, op24_init, sizeof(_Float16) * 18);
static _Float16 op34_init[] = {0.0f};
model->setOperandValue(op34, op34_init, sizeof(_Float16) * 1);
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy593_init[] = {0.0f};
model->setOperandValue(dummy593, dummy593_init, sizeof(_Float16) * 1);
static int32_t param656_init[] = {0};
model->setOperandValue(param656, param656_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy593, param656}, {op14});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type265(Type::TENSOR_FLOAT16, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type248);
auto op24 = model->addOperand(&type243);
auto op34 = model->addOperand(&type70);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type265);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type248(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type248);
auto op24 = model->addOperand(&type243);
auto op34 = model->addOperand(&type70);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type68);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14, op24, op34},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type265(Type::TENSOR_FLOAT16, {1, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type250);
auto op24 = model->addOperand(&type243);
auto op34 = model->addOperand(&type70);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type265);
auto op14_tmp = model->addOperand(&type250);
auto dummy594 = model->addOperand(&type70);
auto param657 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type243);
auto dummy595 = model->addOperand(&type70);
auto param658 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type70);
auto dummy596 = model->addOperand(&type70);
auto param659 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy594_init[] = {0.0f};
model->setOperandValue(dummy594, dummy594_init, sizeof(_Float16) * 1);
static int32_t param657_init[] = {0};
model->setOperandValue(param657, param657_init, sizeof(int32_t) * 1);
static _Float16 dummy595_init[] = {0.0f};
model->setOperandValue(dummy595, dummy595_init, sizeof(_Float16) * 1);
static int32_t param658_init[] = {0};
model->setOperandValue(param658, param658_init, sizeof(int32_t) * 1);
static _Float16 dummy596_init[] = {0.0f};
model->setOperandValue(dummy596, dummy596_init, sizeof(_Float16) * 1);
static int32_t param659_init[] = {0};
model->setOperandValue(param659, param659_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy594, param657}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy595, param658}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy596, param659}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type243(Type::TENSOR_FLOAT16, {1, 3, 3, 2});
OperandType type250(Type::TENSOR_FLOAT16, {1, 2, 4, 4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op14 = model->addOperand(&type250);
auto op24 = model->addOperand(&type243);
auto op34 = model->addOperand(&type70);
auto param15 = model->addOperand(&type5);
auto param16 = model->addOperand(&type5);
auto param17 = model->addOperand(&type5);
auto param18 = model->addOperand(&type5);
auto param19 = model->addOperand(&type5);
auto param20 = model->addOperand(&type5);
auto param21 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op44 = model->addOperand(&type68);
auto op14_tmp = model->addOperand(&type250);
auto dummy597 = model->addOperand(&type70);
auto param660 = model->addOperand(&type5);
auto op24_tmp = model->addOperand(&type243);
auto dummy598 = model->addOperand(&type70);
auto param661 = model->addOperand(&type5);
auto op34_tmp = model->addOperand(&type70);
auto dummy599 = model->addOperand(&type70);
auto param662 = model->addOperand(&type5);
// Phase 2, operations
static int32_t param15_init[] = {1};
model->setOperandValue(param15, param15_init, sizeof(int32_t) * 1);
static int32_t param16_init[] = {2};
model->setOperandValue(param16, param16_init, sizeof(int32_t) * 1);
static int32_t param17_init[] = {2};
model->setOperandValue(param17, param17_init, sizeof(int32_t) * 1);
static int32_t param18_init[] = {1};
model->setOperandValue(param18, param18_init, sizeof(int32_t) * 1);
static int32_t param19_init[] = {1};
model->setOperandValue(param19, param19_init, sizeof(int32_t) * 1);
static int32_t param20_init[] = {1};
model->setOperandValue(param20, param20_init, sizeof(int32_t) * 1);
static int32_t param21_init[] = {0};
model->setOperandValue(param21, param21_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy597_init[] = {0.0f};
model->setOperandValue(dummy597, dummy597_init, sizeof(_Float16) * 1);
static int32_t param660_init[] = {0};
model->setOperandValue(param660, param660_init, sizeof(int32_t) * 1);
static _Float16 dummy598_init[] = {0.0f};
model->setOperandValue(dummy598, dummy598_init, sizeof(_Float16) * 1);
static int32_t param661_init[] = {0};
model->setOperandValue(param661, param661_init, sizeof(int32_t) * 1);
static _Float16 dummy599_init[] = {0.0f};
model->setOperandValue(dummy599, dummy599_init, sizeof(_Float16) * 1);
static int32_t param662_init[] = {0};
model->setOperandValue(param662, param662_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op14_tmp, dummy597, param660}, {op14});
model->addOperation(ANEURALNETWORKS_ADD, {op24_tmp, dummy598, param661}, {op24});
model->addOperation(ANEURALNETWORKS_ADD, {op34_tmp, dummy599, param662}, {op34});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op14, op24, op34, param15, param16, param17, param18, param19, param20, param21, layout}, {op44});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op14_tmp, op24_tmp, op34_tmp},
{op44});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_4(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type23(Type::TENSOR_FLOAT32, {0, 2, 2, 1});
OperandType type24(Type::TENSOR_FLOAT32, {0, 5, 5, 2});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type15);
auto roi = model->addOperand(&type16);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type17);
auto roiOut = model->addOperand(&type19);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type22);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type23);
auto weights = model->addOperand(&type2);
auto bias = model->addOperand(&type3);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type24);
// Phase 2, operations
static float scores_init[] = {0.9f, 0.1f};
model->setOperandValue(scores, scores_init, sizeof(float) * 2);
static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(float) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(float) * 18);
static float bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(float) * 2);
static int32_t shape4_init[] = {0, 5, 5, 2};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type23(Type::TENSOR_FLOAT32, {0, 2, 2, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type15);
auto roi = model->addOperand(&type16);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type17);
auto roiOut = model->addOperand(&type19);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type22);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type23);
auto weights = model->addOperand(&type2);
auto bias = model->addOperand(&type3);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type27);
// Phase 2, operations
static float scores_init[] = {0.9f, 0.1f};
model->setOperandValue(scores, scores_init, sizeof(float) * 2);
static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(float) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(float) * 18);
static float bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(float) * 2);
static int32_t shape4_init[] = {0, 5, 5, 2};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type23(Type::TENSOR_FLOAT32, {0, 2, 2, 1});
OperandType type24(Type::TENSOR_FLOAT32, {0, 5, 5, 2});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type15);
auto roi = model->addOperand(&type16);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type17);
auto roiOut = model->addOperand(&type19);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type22);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type23);
auto weights = model->addOperand(&type2);
auto bias = model->addOperand(&type3);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type24);
// Phase 2, operations
static float scores_init[] = {0.9f, 0.1f};
model->setOperandValue(scores, scores_init, sizeof(float) * 2);
static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(float) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(float) * 18);
static float bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(float) * 2);
static int32_t shape4_init[] = {0, 5, 5, 2};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type23(Type::TENSOR_FLOAT32, {0, 2, 2, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type15);
auto roi = model->addOperand(&type16);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type17);
auto roiOut = model->addOperand(&type19);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type22);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type23);
auto weights = model->addOperand(&type2);
auto bias = model->addOperand(&type3);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type27);
// Phase 2, operations
static float scores_init[] = {0.9f, 0.1f};
model->setOperandValue(scores, scores_init, sizeof(float) * 2);
static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(float) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(float) * 18);
static float bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(float) * 2);
static int32_t shape4_init[] = {0, 5, 5, 2};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type266(Type::TENSOR_INT32, {2}, 0.01f, 0);
OperandType type267(Type::TENSOR_QUANT8_ASYMM, {0, 2, 2, 1}, 0.1f, 128);
OperandType type268(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
OperandType type269(Type::TENSOR_QUANT8_ASYMM, {0, 5, 5, 2}, 0.1f, 128);
OperandType type270(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
OperandType type271(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
OperandType type272(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
OperandType type273(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
OperandType type274(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.1f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type272);
auto roi = model->addOperand(&type270);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type273);
auto roiOut = model->addOperand(&type271);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type268);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type267);
auto weights = model->addOperand(&type274);
auto bias = model->addOperand(&type266);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type269);
// Phase 2, operations
static uint8_t scores_init[] = {137, 129};
model->setOperandValue(scores, scores_init, sizeof(uint8_t) * 2);
static uint16_t roi_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
model->setOperandValue(roi, roi_init, sizeof(uint16_t) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t weights_init[] = {138, 158, 178, 198, 218, 238, 218, 198, 178, 148, 168, 188, 208, 228, 248, 228, 208, 188};
model->setOperandValue(weights, weights_init, sizeof(uint8_t) * 18);
static int32_t bias_init[] = {-150, -200};
model->setOperandValue(bias, bias_init, sizeof(int32_t) * 2);
static int32_t shape4_init[] = {0, 5, 5, 2};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type266(Type::TENSOR_INT32, {2}, 0.01f, 0);
OperandType type267(Type::TENSOR_QUANT8_ASYMM, {0, 2, 2, 1}, 0.1f, 128);
OperandType type268(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
OperandType type270(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
OperandType type271(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
OperandType type272(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
OperandType type273(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
OperandType type274(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.1f, 128);
OperandType type275(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type272);
auto roi = model->addOperand(&type270);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type273);
auto roiOut = model->addOperand(&type271);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type268);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type267);
auto weights = model->addOperand(&type274);
auto bias = model->addOperand(&type266);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type275);
// Phase 2, operations
static uint8_t scores_init[] = {137, 129};
model->setOperandValue(scores, scores_init, sizeof(uint8_t) * 2);
static uint16_t roi_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
model->setOperandValue(roi, roi_init, sizeof(uint16_t) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t weights_init[] = {138, 158, 178, 198, 218, 238, 218, 198, 178, 148, 168, 188, 208, 228, 248, 228, 208, 188};
model->setOperandValue(weights, weights_init, sizeof(uint8_t) * 18);
static int32_t bias_init[] = {-150, -200};
model->setOperandValue(bias, bias_init, sizeof(int32_t) * 2);
static int32_t shape4_init[] = {0, 5, 5, 2};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type276(Type::TENSOR_FLOAT16, {0, 2, 2, 1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type278(Type::TENSOR_FLOAT16, {0, 5, 5, 2});
OperandType type279(Type::FLOAT16, {});
OperandType type280(Type::TENSOR_FLOAT16, {1, 8});
OperandType type281(Type::TENSOR_FLOAT16, {0, 4});
OperandType type282(Type::TENSOR_FLOAT16, {1, 2});
OperandType type283(Type::TENSOR_FLOAT16, {0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto scores = model->addOperand(&type282);
auto roi = model->addOperand(&type280);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type279);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type279);
auto param27 = model->addOperand(&type279);
auto param28 = model->addOperand(&type279);
auto scoresOut = model->addOperand(&type283);
auto roiOut = model->addOperand(&type281);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type277);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type279);
auto param32 = model->addOperand(&type279);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type276);
auto weights = model->addOperand(&type65);
auto bias = model->addOperand(&type66);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type278);
// Phase 2, operations
static _Float16 scores_init[] = {0.8999999761581421f, 0.10000000149011612f};
model->setOperandValue(scores, scores_init, sizeof(_Float16) * 2);
static _Float16 roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(_Float16) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static _Float16 param23_init[] = {0.30000001192092896f};
model->setOperandValue(param23, param23_init, sizeof(_Float16) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static _Float16 param26_init[] = {0.4000000059604645f};
model->setOperandValue(param26, param26_init, sizeof(_Float16) * 1);
static _Float16 param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(_Float16) * 1);
static _Float16 param28_init[] = {0.30000001192092896f};
model->setOperandValue(param28, param28_init, sizeof(_Float16) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static _Float16 param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(_Float16) * 1);
static _Float16 param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(_Float16) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(_Float16) * 18);
static _Float16 bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(_Float16) * 2);
static int32_t shape4_init[] = {0, 5, 5, 2};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type276(Type::TENSOR_FLOAT16, {0, 2, 2, 1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type279(Type::FLOAT16, {});
OperandType type280(Type::TENSOR_FLOAT16, {1, 8});
OperandType type281(Type::TENSOR_FLOAT16, {0, 4});
OperandType type282(Type::TENSOR_FLOAT16, {1, 2});
OperandType type284(Type::TENSOR_FLOAT16, {0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto scores = model->addOperand(&type282);
auto roi = model->addOperand(&type280);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type279);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type279);
auto param27 = model->addOperand(&type279);
auto param28 = model->addOperand(&type279);
auto scoresOut = model->addOperand(&type284);
auto roiOut = model->addOperand(&type281);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type277);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type279);
auto param32 = model->addOperand(&type279);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type276);
auto weights = model->addOperand(&type65);
auto bias = model->addOperand(&type66);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type68);
// Phase 2, operations
static _Float16 scores_init[] = {0.8999999761581421f, 0.10000000149011612f};
model->setOperandValue(scores, scores_init, sizeof(_Float16) * 2);
static _Float16 roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(_Float16) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static _Float16 param23_init[] = {0.30000001192092896f};
model->setOperandValue(param23, param23_init, sizeof(_Float16) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static _Float16 param26_init[] = {0.4000000059604645f};
model->setOperandValue(param26, param26_init, sizeof(_Float16) * 1);
static _Float16 param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(_Float16) * 1);
static _Float16 param28_init[] = {0.30000001192092896f};
model->setOperandValue(param28, param28_init, sizeof(_Float16) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static _Float16 param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(_Float16) * 1);
static _Float16 param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(_Float16) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(_Float16) * 18);
static _Float16 bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(_Float16) * 2);
static int32_t shape4_init[] = {0, 5, 5, 2};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type285(Type::TENSOR_FLOAT32, {0, 1, 2, 2});
OperandType type286(Type::TENSOR_FLOAT32, {0, 2, 5, 5});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type15);
auto roi = model->addOperand(&type16);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type17);
auto roiOut = model->addOperand(&type19);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type22);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type285);
auto weights = model->addOperand(&type2);
auto bias = model->addOperand(&type3);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type286);
// Phase 2, operations
static float scores_init[] = {0.9f, 0.1f};
model->setOperandValue(scores, scores_init, sizeof(float) * 2);
static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(float) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(float) * 18);
static float bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(float) * 2);
static int32_t shape4_init[] = {0, 2, 5, 5};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type285(Type::TENSOR_FLOAT32, {0, 1, 2, 2});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type15);
auto roi = model->addOperand(&type16);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type17);
auto roiOut = model->addOperand(&type19);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type22);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type285);
auto weights = model->addOperand(&type2);
auto bias = model->addOperand(&type3);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type27);
// Phase 2, operations
static float scores_init[] = {0.9f, 0.1f};
model->setOperandValue(scores, scores_init, sizeof(float) * 2);
static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(float) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(float) * 18);
static float bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(float) * 2);
static int32_t shape4_init[] = {0, 2, 5, 5};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_relaxed(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type285(Type::TENSOR_FLOAT32, {0, 1, 2, 2});
OperandType type286(Type::TENSOR_FLOAT32, {0, 2, 5, 5});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type15);
auto roi = model->addOperand(&type16);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type17);
auto roiOut = model->addOperand(&type19);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type22);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type285);
auto weights = model->addOperand(&type2);
auto bias = model->addOperand(&type3);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type286);
// Phase 2, operations
static float scores_init[] = {0.9f, 0.1f};
model->setOperandValue(scores, scores_init, sizeof(float) * 2);
static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(float) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(float) * 18);
static float bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(float) * 2);
static int32_t shape4_init[] = {0, 2, 5, 5};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_relaxed(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_relaxed_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type2(Type::TENSOR_FLOAT32, {2, 3, 3, 1});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type285(Type::TENSOR_FLOAT32, {0, 1, 2, 2});
OperandType type3(Type::TENSOR_FLOAT32, {2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type15);
auto roi = model->addOperand(&type16);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type17);
auto roiOut = model->addOperand(&type19);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type22);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type285);
auto weights = model->addOperand(&type2);
auto bias = model->addOperand(&type3);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type27);
// Phase 2, operations
static float scores_init[] = {0.9f, 0.1f};
model->setOperandValue(scores, scores_init, sizeof(float) * 2);
static float roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(float) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(float) * 18);
static float bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(float) * 2);
static int32_t shape4_init[] = {0, 2, 5, 5};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_relaxed_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_quant8(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type266(Type::TENSOR_INT32, {2}, 0.01f, 0);
OperandType type268(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
OperandType type270(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
OperandType type271(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
OperandType type272(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
OperandType type273(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
OperandType type274(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.1f, 128);
OperandType type287(Type::TENSOR_QUANT8_ASYMM, {0, 1, 2, 2}, 0.1f, 128);
OperandType type288(Type::TENSOR_QUANT8_ASYMM, {0, 2, 5, 5}, 0.1f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type272);
auto roi = model->addOperand(&type270);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type273);
auto roiOut = model->addOperand(&type271);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type268);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type287);
auto weights = model->addOperand(&type274);
auto bias = model->addOperand(&type266);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type288);
// Phase 2, operations
static uint8_t scores_init[] = {137, 129};
model->setOperandValue(scores, scores_init, sizeof(uint8_t) * 2);
static uint16_t roi_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
model->setOperandValue(roi, roi_init, sizeof(uint16_t) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t weights_init[] = {138, 158, 178, 198, 218, 238, 218, 198, 178, 148, 168, 188, 208, 228, 248, 228, 208, 188};
model->setOperandValue(weights, weights_init, sizeof(uint8_t) * 18);
static int32_t bias_init[] = {-150, -200};
model->setOperandValue(bias, bias_init, sizeof(int32_t) * 2);
static int32_t shape4_init[] = {0, 2, 5, 5};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_quant8(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_quant8_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type266(Type::TENSOR_INT32, {2}, 0.01f, 0);
OperandType type268(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
OperandType type270(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
OperandType type271(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
OperandType type272(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
OperandType type273(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
OperandType type274(Type::TENSOR_QUANT8_ASYMM, {2, 3, 3, 1}, 0.1f, 128);
OperandType type275(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 128);
OperandType type287(Type::TENSOR_QUANT8_ASYMM, {0, 1, 2, 2}, 0.1f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores = model->addOperand(&type272);
auto roi = model->addOperand(&type270);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type21);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type21);
auto param27 = model->addOperand(&type21);
auto param28 = model->addOperand(&type21);
auto scoresOut = model->addOperand(&type273);
auto roiOut = model->addOperand(&type271);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type268);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type21);
auto param32 = model->addOperand(&type21);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type287);
auto weights = model->addOperand(&type274);
auto bias = model->addOperand(&type266);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type275);
// Phase 2, operations
static uint8_t scores_init[] = {137, 129};
model->setOperandValue(scores, scores_init, sizeof(uint8_t) * 2);
static uint16_t roi_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
model->setOperandValue(roi, roi_init, sizeof(uint16_t) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static float param23_init[] = {0.3f};
model->setOperandValue(param23, param23_init, sizeof(float) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static float param26_init[] = {0.4f};
model->setOperandValue(param26, param26_init, sizeof(float) * 1);
static float param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(float) * 1);
static float param28_init[] = {0.3f};
model->setOperandValue(param28, param28_init, sizeof(float) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static float param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(float) * 1);
static float param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(float) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t weights_init[] = {138, 158, 178, 198, 218, 238, 218, 198, 178, 148, 168, 188, 208, 228, 248, 228, 208, 188};
model->setOperandValue(weights, weights_init, sizeof(uint8_t) * 18);
static int32_t bias_init[] = {-150, -200};
model->setOperandValue(bias, bias_init, sizeof(int32_t) * 2);
static int32_t shape4_init[] = {0, 2, 5, 5};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_quant8_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_float16(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type279(Type::FLOAT16, {});
OperandType type280(Type::TENSOR_FLOAT16, {1, 8});
OperandType type281(Type::TENSOR_FLOAT16, {0, 4});
OperandType type282(Type::TENSOR_FLOAT16, {1, 2});
OperandType type283(Type::TENSOR_FLOAT16, {0});
OperandType type289(Type::TENSOR_FLOAT16, {0, 1, 2, 2});
OperandType type290(Type::TENSOR_FLOAT16, {0, 2, 5, 5});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
// Phase 1, operands
auto scores = model->addOperand(&type282);
auto roi = model->addOperand(&type280);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type279);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type279);
auto param27 = model->addOperand(&type279);
auto param28 = model->addOperand(&type279);
auto scoresOut = model->addOperand(&type283);
auto roiOut = model->addOperand(&type281);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type277);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type279);
auto param32 = model->addOperand(&type279);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type289);
auto weights = model->addOperand(&type65);
auto bias = model->addOperand(&type66);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type290);
// Phase 2, operations
static _Float16 scores_init[] = {0.8999999761581421f, 0.10000000149011612f};
model->setOperandValue(scores, scores_init, sizeof(_Float16) * 2);
static _Float16 roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(_Float16) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static _Float16 param23_init[] = {0.30000001192092896f};
model->setOperandValue(param23, param23_init, sizeof(_Float16) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static _Float16 param26_init[] = {0.4000000059604645f};
model->setOperandValue(param26, param26_init, sizeof(_Float16) * 1);
static _Float16 param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(_Float16) * 1);
static _Float16 param28_init[] = {0.30000001192092896f};
model->setOperandValue(param28, param28_init, sizeof(_Float16) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static _Float16 param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(_Float16) * 1);
static _Float16 param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(_Float16) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(_Float16) * 18);
static _Float16 bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(_Float16) * 2);
static int32_t shape4_init[] = {0, 2, 5, 5};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_float16(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_float16_dynamic_output_shape(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type279(Type::FLOAT16, {});
OperandType type280(Type::TENSOR_FLOAT16, {1, 8});
OperandType type281(Type::TENSOR_FLOAT16, {0, 4});
OperandType type282(Type::TENSOR_FLOAT16, {1, 2});
OperandType type284(Type::TENSOR_FLOAT16, {0});
OperandType type289(Type::TENSOR_FLOAT16, {0, 1, 2, 2});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type65(Type::TENSOR_FLOAT16, {2, 3, 3, 1});
OperandType type66(Type::TENSOR_FLOAT16, {2});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto scores = model->addOperand(&type282);
auto roi = model->addOperand(&type280);
auto param22 = model->addOperand(&type20);
auto param23 = model->addOperand(&type279);
auto param24 = model->addOperand(&type5);
auto param25 = model->addOperand(&type5);
auto param26 = model->addOperand(&type279);
auto param27 = model->addOperand(&type279);
auto param28 = model->addOperand(&type279);
auto scoresOut = model->addOperand(&type284);
auto roiOut = model->addOperand(&type281);
auto classesOut = model->addOperand(&type18);
auto batchSplitOut = model->addOperand(&type18);
auto in = model->addOperand(&type277);
auto param29 = model->addOperand(&type5);
auto param30 = model->addOperand(&type5);
auto param31 = model->addOperand(&type279);
auto param32 = model->addOperand(&type279);
auto param33 = model->addOperand(&type5);
auto param34 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap = model->addOperand(&type289);
auto weights = model->addOperand(&type65);
auto bias = model->addOperand(&type66);
auto shape4 = model->addOperand(&type4);
auto param35 = model->addOperand(&type5);
auto param36 = model->addOperand(&type5);
auto param37 = model->addOperand(&type5);
auto param38 = model->addOperand(&type5);
auto out = model->addOperand(&type68);
// Phase 2, operations
static _Float16 scores_init[] = {0.8999999761581421f, 0.10000000149011612f};
model->setOperandValue(scores, scores_init, sizeof(_Float16) * 2);
static _Float16 roi_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi, roi_init, sizeof(_Float16) * 8);
static int32_t param22_init[] = {0};
model->setOperandValue(param22, param22_init, sizeof(int32_t) * 1);
static _Float16 param23_init[] = {0.30000001192092896f};
model->setOperandValue(param23, param23_init, sizeof(_Float16) * 1);
static int32_t param24_init[] = {-1};
model->setOperandValue(param24, param24_init, sizeof(int32_t) * 1);
static int32_t param25_init[] = {0};
model->setOperandValue(param25, param25_init, sizeof(int32_t) * 1);
static _Float16 param26_init[] = {0.4000000059604645f};
model->setOperandValue(param26, param26_init, sizeof(_Float16) * 1);
static _Float16 param27_init[] = {1.0f};
model->setOperandValue(param27, param27_init, sizeof(_Float16) * 1);
static _Float16 param28_init[] = {0.30000001192092896f};
model->setOperandValue(param28, param28_init, sizeof(_Float16) * 1);
static int32_t param29_init[] = {2};
model->setOperandValue(param29, param29_init, sizeof(int32_t) * 1);
static int32_t param30_init[] = {2};
model->setOperandValue(param30, param30_init, sizeof(int32_t) * 1);
static _Float16 param31_init[] = {2.0f};
model->setOperandValue(param31, param31_init, sizeof(_Float16) * 1);
static _Float16 param32_init[] = {2.0f};
model->setOperandValue(param32, param32_init, sizeof(_Float16) * 1);
static int32_t param33_init[] = {4};
model->setOperandValue(param33, param33_init, sizeof(int32_t) * 1);
static int32_t param34_init[] = {4};
model->setOperandValue(param34, param34_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 weights_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f, 10.0f, 8.0f, 6.0f};
model->setOperandValue(weights, weights_init, sizeof(_Float16) * 18);
static _Float16 bias_init[] = {-1.5f, -2.0f};
model->setOperandValue(bias, bias_init, sizeof(_Float16) * 2);
static int32_t shape4_init[] = {0, 2, 5, 5};
model->setOperandValue(shape4, shape4_init, sizeof(int32_t) * 4);
static int32_t param35_init[] = {2};
model->setOperandValue(param35, param35_init, sizeof(int32_t) * 1);
static int32_t param36_init[] = {2};
model->setOperandValue(param36, param36_init, sizeof(int32_t) * 1);
static int32_t param37_init[] = {2};
model->setOperandValue(param37, param37_init, sizeof(int32_t) * 1);
static int32_t param38_init[] = {0};
model->setOperandValue(param38, param38_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores, roi, param22, param23, param24, param25, param26, param27, param28}, {scoresOut, roiOut, classesOut, batchSplitOut});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in, roiOut, batchSplitOut, param29, param30, param31, param32, param33, param34, layout}, {featureMap});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap, weights, bias, shape4, param35, param36, param37, param38, layout}, {out});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in},
{scoresOut, classesOut, out});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_float16_dynamic_output_shape(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type25(Type::TENSOR_FLOAT32, {0, 4, 4, 1});
OperandType type26(Type::TENSOR_FLOAT32, {0, 3, 3, 1});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto scores1 = model->addOperand(&type15);
auto roi1 = model->addOperand(&type16);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type17);
auto roiOut1 = model->addOperand(&type19);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type22);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type25);
auto weights1 = model->addOperand(&type8);
auto bias1 = model->addOperand(&type9);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type26);
// Phase 2, operations
static float scores1_init[] = {0.9f, 0.1f};
model->setOperandValue(scores1, scores1_init, sizeof(float) * 2);
static float roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(float) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(float) * 9);
static float bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(float) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type25(Type::TENSOR_FLOAT32, {0, 4, 4, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto scores1 = model->addOperand(&type15);
auto roi1 = model->addOperand(&type16);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type17);
auto roiOut1 = model->addOperand(&type19);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type22);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type25);
auto weights1 = model->addOperand(&type8);
auto bias1 = model->addOperand(&type9);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type27);
// Phase 2, operations
static float scores1_init[] = {0.9f, 0.1f};
model->setOperandValue(scores1, scores1_init, sizeof(float) * 2);
static float roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(float) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(float) * 9);
static float bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(float) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_relaxed_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type25(Type::TENSOR_FLOAT32, {0, 4, 4, 1});
OperandType type26(Type::TENSOR_FLOAT32, {0, 3, 3, 1});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto scores1 = model->addOperand(&type15);
auto roi1 = model->addOperand(&type16);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type17);
auto roiOut1 = model->addOperand(&type19);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type22);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type25);
auto weights1 = model->addOperand(&type8);
auto bias1 = model->addOperand(&type9);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type26);
// Phase 2, operations
static float scores1_init[] = {0.9f, 0.1f};
model->setOperandValue(scores1, scores1_init, sizeof(float) * 2);
static float roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(float) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(float) * 9);
static float bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(float) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_relaxed_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_relaxed_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type25(Type::TENSOR_FLOAT32, {0, 4, 4, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto scores1 = model->addOperand(&type15);
auto roi1 = model->addOperand(&type16);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type17);
auto roiOut1 = model->addOperand(&type19);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type22);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type25);
auto weights1 = model->addOperand(&type8);
auto bias1 = model->addOperand(&type9);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type27);
// Phase 2, operations
static float scores1_init[] = {0.9f, 0.1f};
model->setOperandValue(scores1, scores1_init, sizeof(float) * 2);
static float roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(float) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(float) * 9);
static float bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(float) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_relaxed_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type268(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
OperandType type270(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
OperandType type271(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
OperandType type272(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
OperandType type273(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
OperandType type291(Type::TENSOR_INT32, {1}, 0.01f, 0);
OperandType type292(Type::TENSOR_QUANT8_ASYMM, {0, 4, 4, 1}, 0.1f, 128);
OperandType type293(Type::TENSOR_QUANT8_ASYMM, {0, 3, 3, 1}, 0.1f, 128);
OperandType type294(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.1f, 128);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores1 = model->addOperand(&type272);
auto roi1 = model->addOperand(&type270);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type273);
auto roiOut1 = model->addOperand(&type271);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type268);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type292);
auto weights1 = model->addOperand(&type294);
auto bias1 = model->addOperand(&type291);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type293);
// Phase 2, operations
static uint8_t scores1_init[] = {137, 129};
model->setOperandValue(scores1, scores1_init, sizeof(uint8_t) * 2);
static uint16_t roi1_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
model->setOperandValue(roi1, roi1_init, sizeof(uint16_t) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t weights1_init[] = {138, 158, 178, 198, 218, 238, 218, 198, 178};
model->setOperandValue(weights1, weights1_init, sizeof(uint8_t) * 9);
static int32_t bias1_init[] = {-150};
model->setOperandValue(bias1, bias1_init, sizeof(int32_t) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type268(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
OperandType type270(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
OperandType type271(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
OperandType type272(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
OperandType type273(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
OperandType type275(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 128);
OperandType type291(Type::TENSOR_INT32, {1}, 0.01f, 0);
OperandType type292(Type::TENSOR_QUANT8_ASYMM, {0, 4, 4, 1}, 0.1f, 128);
OperandType type294(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.1f, 128);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores1 = model->addOperand(&type272);
auto roi1 = model->addOperand(&type270);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type273);
auto roiOut1 = model->addOperand(&type271);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type268);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type292);
auto weights1 = model->addOperand(&type294);
auto bias1 = model->addOperand(&type291);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type275);
// Phase 2, operations
static uint8_t scores1_init[] = {137, 129};
model->setOperandValue(scores1, scores1_init, sizeof(uint8_t) * 2);
static uint16_t roi1_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
model->setOperandValue(roi1, roi1_init, sizeof(uint16_t) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t weights1_init[] = {138, 158, 178, 198, 218, 238, 218, 198, 178};
model->setOperandValue(weights1, weights1_init, sizeof(uint8_t) * 9);
static int32_t bias1_init[] = {-150};
model->setOperandValue(bias1, bias1_init, sizeof(int32_t) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_float16_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type279(Type::FLOAT16, {});
OperandType type280(Type::TENSOR_FLOAT16, {1, 8});
OperandType type281(Type::TENSOR_FLOAT16, {0, 4});
OperandType type282(Type::TENSOR_FLOAT16, {1, 2});
OperandType type283(Type::TENSOR_FLOAT16, {0});
OperandType type295(Type::TENSOR_FLOAT16, {0, 4, 4, 1});
OperandType type296(Type::TENSOR_FLOAT16, {0, 3, 3, 1});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores1 = model->addOperand(&type282);
auto roi1 = model->addOperand(&type280);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type279);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type279);
auto param44 = model->addOperand(&type279);
auto param45 = model->addOperand(&type279);
auto scoresOut1 = model->addOperand(&type283);
auto roiOut1 = model->addOperand(&type281);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type277);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type279);
auto param49 = model->addOperand(&type279);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type295);
auto weights1 = model->addOperand(&type214);
auto bias1 = model->addOperand(&type215);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type296);
// Phase 2, operations
static _Float16 scores1_init[] = {0.8999999761581421f, 0.10000000149011612f};
model->setOperandValue(scores1, scores1_init, sizeof(_Float16) * 2);
static _Float16 roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(_Float16) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static _Float16 param40_init[] = {0.30000001192092896f};
model->setOperandValue(param40, param40_init, sizeof(_Float16) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static _Float16 param43_init[] = {0.4000000059604645f};
model->setOperandValue(param43, param43_init, sizeof(_Float16) * 1);
static _Float16 param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(_Float16) * 1);
static _Float16 param45_init[] = {0.30000001192092896f};
model->setOperandValue(param45, param45_init, sizeof(_Float16) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static _Float16 param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(_Float16) * 1);
static _Float16 param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(_Float16) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(_Float16) * 9);
static _Float16 bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(_Float16) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_float16_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nhwc_float16_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type279(Type::FLOAT16, {});
OperandType type280(Type::TENSOR_FLOAT16, {1, 8});
OperandType type281(Type::TENSOR_FLOAT16, {0, 4});
OperandType type282(Type::TENSOR_FLOAT16, {1, 2});
OperandType type284(Type::TENSOR_FLOAT16, {0});
OperandType type295(Type::TENSOR_FLOAT16, {0, 4, 4, 1});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto scores1 = model->addOperand(&type282);
auto roi1 = model->addOperand(&type280);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type279);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type279);
auto param44 = model->addOperand(&type279);
auto param45 = model->addOperand(&type279);
auto scoresOut1 = model->addOperand(&type284);
auto roiOut1 = model->addOperand(&type281);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type277);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type279);
auto param49 = model->addOperand(&type279);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type295);
auto weights1 = model->addOperand(&type214);
auto bias1 = model->addOperand(&type215);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 scores1_init[] = {0.8999999761581421f, 0.10000000149011612f};
model->setOperandValue(scores1, scores1_init, sizeof(_Float16) * 2);
static _Float16 roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(_Float16) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static _Float16 param40_init[] = {0.30000001192092896f};
model->setOperandValue(param40, param40_init, sizeof(_Float16) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static _Float16 param43_init[] = {0.4000000059604645f};
model->setOperandValue(param43, param43_init, sizeof(_Float16) * 1);
static _Float16 param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(_Float16) * 1);
static _Float16 param45_init[] = {0.30000001192092896f};
model->setOperandValue(param45, param45_init, sizeof(_Float16) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static _Float16 param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(_Float16) * 1);
static _Float16 param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(_Float16) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(_Float16) * 9);
static _Float16 bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(_Float16) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nhwc_float16_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type297(Type::TENSOR_FLOAT32, {0, 1, 4, 4});
OperandType type298(Type::TENSOR_FLOAT32, {0, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto scores1 = model->addOperand(&type15);
auto roi1 = model->addOperand(&type16);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type17);
auto roiOut1 = model->addOperand(&type19);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type22);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type297);
auto weights1 = model->addOperand(&type8);
auto bias1 = model->addOperand(&type9);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type298);
// Phase 2, operations
static float scores1_init[] = {0.9f, 0.1f};
model->setOperandValue(scores1, scores1_init, sizeof(float) * 2);
static float roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(float) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(float) * 9);
static float bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(float) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type297(Type::TENSOR_FLOAT32, {0, 1, 4, 4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto scores1 = model->addOperand(&type15);
auto roi1 = model->addOperand(&type16);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type17);
auto roiOut1 = model->addOperand(&type19);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type22);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type297);
auto weights1 = model->addOperand(&type8);
auto bias1 = model->addOperand(&type9);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type27);
// Phase 2, operations
static float scores1_init[] = {0.9f, 0.1f};
model->setOperandValue(scores1, scores1_init, sizeof(float) * 2);
static float roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(float) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(float) * 9);
static float bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(float) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_relaxed_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type297(Type::TENSOR_FLOAT32, {0, 1, 4, 4});
OperandType type298(Type::TENSOR_FLOAT32, {0, 1, 3, 3});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto scores1 = model->addOperand(&type15);
auto roi1 = model->addOperand(&type16);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type17);
auto roiOut1 = model->addOperand(&type19);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type22);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type297);
auto weights1 = model->addOperand(&type8);
auto bias1 = model->addOperand(&type9);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type298);
// Phase 2, operations
static float scores1_init[] = {0.9f, 0.1f};
model->setOperandValue(scores1, scores1_init, sizeof(float) * 2);
static float roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(float) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(float) * 9);
static float bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(float) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_relaxed_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_relaxed_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type15(Type::TENSOR_FLOAT32, {1, 2});
OperandType type16(Type::TENSOR_FLOAT32, {1, 8});
OperandType type17(Type::TENSOR_FLOAT32, {0});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type19(Type::TENSOR_FLOAT32, {0, 4});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type297(Type::TENSOR_FLOAT32, {0, 1, 4, 4});
OperandType type5(Type::INT32, {});
OperandType type8(Type::TENSOR_FLOAT32, {1, 3, 3, 1});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto scores1 = model->addOperand(&type15);
auto roi1 = model->addOperand(&type16);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type17);
auto roiOut1 = model->addOperand(&type19);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type22);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type297);
auto weights1 = model->addOperand(&type8);
auto bias1 = model->addOperand(&type9);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type27);
// Phase 2, operations
static float scores1_init[] = {0.9f, 0.1f};
model->setOperandValue(scores1, scores1_init, sizeof(float) * 2);
static float roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(float) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(float) * 9);
static float bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(float) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_relaxed_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_quant8_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type268(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
OperandType type270(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
OperandType type271(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
OperandType type272(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
OperandType type273(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
OperandType type291(Type::TENSOR_INT32, {1}, 0.01f, 0);
OperandType type294(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.1f, 128);
OperandType type299(Type::TENSOR_QUANT8_ASYMM, {0, 1, 4, 4}, 0.1f, 128);
OperandType type300(Type::TENSOR_QUANT8_ASYMM, {0, 1, 3, 3}, 0.1f, 128);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores1 = model->addOperand(&type272);
auto roi1 = model->addOperand(&type270);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type273);
auto roiOut1 = model->addOperand(&type271);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type268);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type299);
auto weights1 = model->addOperand(&type294);
auto bias1 = model->addOperand(&type291);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type300);
// Phase 2, operations
static uint8_t scores1_init[] = {137, 129};
model->setOperandValue(scores1, scores1_init, sizeof(uint8_t) * 2);
static uint16_t roi1_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
model->setOperandValue(roi1, roi1_init, sizeof(uint16_t) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t weights1_init[] = {138, 158, 178, 198, 218, 238, 218, 198, 178};
model->setOperandValue(weights1, weights1_init, sizeof(uint8_t) * 9);
static int32_t bias1_init[] = {-150};
model->setOperandValue(bias1, bias1_init, sizeof(int32_t) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_quant8_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_quant8_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type21(Type::FLOAT32, {});
OperandType type268(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.1f, 128);
OperandType type270(Type::TENSOR_QUANT16_ASYMM, {1, 8}, 0.125f, 0);
OperandType type271(Type::TENSOR_QUANT16_ASYMM, {0, 4}, 0.125f, 0);
OperandType type272(Type::TENSOR_QUANT8_ASYMM, {1, 2}, 0.1f, 128);
OperandType type273(Type::TENSOR_QUANT8_ASYMM, {0}, 0.1f, 128);
OperandType type275(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 0.1f, 128);
OperandType type291(Type::TENSOR_INT32, {1}, 0.01f, 0);
OperandType type294(Type::TENSOR_QUANT8_ASYMM, {1, 3, 3, 1}, 0.1f, 128);
OperandType type299(Type::TENSOR_QUANT8_ASYMM, {0, 1, 4, 4}, 0.1f, 128);
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores1 = model->addOperand(&type272);
auto roi1 = model->addOperand(&type270);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type21);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type21);
auto param44 = model->addOperand(&type21);
auto param45 = model->addOperand(&type21);
auto scoresOut1 = model->addOperand(&type273);
auto roiOut1 = model->addOperand(&type271);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type268);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type21);
auto param49 = model->addOperand(&type21);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type299);
auto weights1 = model->addOperand(&type294);
auto bias1 = model->addOperand(&type291);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type275);
// Phase 2, operations
static uint8_t scores1_init[] = {137, 129};
model->setOperandValue(scores1, scores1_init, sizeof(uint8_t) * 2);
static uint16_t roi1_init[] = {8, 8, 80, 80, 0, 0, 80, 80};
model->setOperandValue(roi1, roi1_init, sizeof(uint16_t) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static float param40_init[] = {0.3f};
model->setOperandValue(param40, param40_init, sizeof(float) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static float param43_init[] = {0.4f};
model->setOperandValue(param43, param43_init, sizeof(float) * 1);
static float param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(float) * 1);
static float param45_init[] = {0.3f};
model->setOperandValue(param45, param45_init, sizeof(float) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static float param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(float) * 1);
static float param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(float) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t weights1_init[] = {138, 158, 178, 198, 218, 238, 218, 198, 178};
model->setOperandValue(weights1, weights1_init, sizeof(uint8_t) * 9);
static int32_t bias1_init[] = {-150};
model->setOperandValue(bias1, bias1_init, sizeof(int32_t) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_quant8_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_float16_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type279(Type::FLOAT16, {});
OperandType type280(Type::TENSOR_FLOAT16, {1, 8});
OperandType type281(Type::TENSOR_FLOAT16, {0, 4});
OperandType type282(Type::TENSOR_FLOAT16, {1, 2});
OperandType type283(Type::TENSOR_FLOAT16, {0});
OperandType type301(Type::TENSOR_FLOAT16, {0, 1, 4, 4});
OperandType type302(Type::TENSOR_FLOAT16, {0, 1, 3, 3});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto scores1 = model->addOperand(&type282);
auto roi1 = model->addOperand(&type280);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type279);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type279);
auto param44 = model->addOperand(&type279);
auto param45 = model->addOperand(&type279);
auto scoresOut1 = model->addOperand(&type283);
auto roiOut1 = model->addOperand(&type281);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type277);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type279);
auto param49 = model->addOperand(&type279);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type301);
auto weights1 = model->addOperand(&type214);
auto bias1 = model->addOperand(&type215);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type302);
// Phase 2, operations
static _Float16 scores1_init[] = {0.8999999761581421f, 0.10000000149011612f};
model->setOperandValue(scores1, scores1_init, sizeof(_Float16) * 2);
static _Float16 roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(_Float16) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static _Float16 param40_init[] = {0.30000001192092896f};
model->setOperandValue(param40, param40_init, sizeof(_Float16) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static _Float16 param43_init[] = {0.4000000059604645f};
model->setOperandValue(param43, param43_init, sizeof(_Float16) * 1);
static _Float16 param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(_Float16) * 1);
static _Float16 param45_init[] = {0.30000001192092896f};
model->setOperandValue(param45, param45_init, sizeof(_Float16) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static _Float16 param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(_Float16) * 1);
static _Float16 param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(_Float16) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(_Float16) * 9);
static _Float16 bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(_Float16) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_float16_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_zero_sized_nchw_float16_dynamic_output_shape_2(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type18(Type::TENSOR_INT32, {0});
OperandType type20(Type::TENSOR_INT32, {1});
OperandType type214(Type::TENSOR_FLOAT16, {1, 3, 3, 1});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type279(Type::FLOAT16, {});
OperandType type280(Type::TENSOR_FLOAT16, {1, 8});
OperandType type281(Type::TENSOR_FLOAT16, {0, 4});
OperandType type282(Type::TENSOR_FLOAT16, {1, 2});
OperandType type284(Type::TENSOR_FLOAT16, {0});
OperandType type301(Type::TENSOR_FLOAT16, {0, 1, 4, 4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto scores1 = model->addOperand(&type282);
auto roi1 = model->addOperand(&type280);
auto param39 = model->addOperand(&type20);
auto param40 = model->addOperand(&type279);
auto param41 = model->addOperand(&type5);
auto param42 = model->addOperand(&type5);
auto param43 = model->addOperand(&type279);
auto param44 = model->addOperand(&type279);
auto param45 = model->addOperand(&type279);
auto scoresOut1 = model->addOperand(&type284);
auto roiOut1 = model->addOperand(&type281);
auto classesOut1 = model->addOperand(&type18);
auto batchSplitOut1 = model->addOperand(&type18);
auto in1 = model->addOperand(&type277);
auto param46 = model->addOperand(&type5);
auto param47 = model->addOperand(&type5);
auto param48 = model->addOperand(&type279);
auto param49 = model->addOperand(&type279);
auto param50 = model->addOperand(&type5);
auto param51 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto featureMap1 = model->addOperand(&type301);
auto weights1 = model->addOperand(&type214);
auto bias1 = model->addOperand(&type215);
auto param52 = model->addOperand(&type5);
auto param53 = model->addOperand(&type5);
auto param54 = model->addOperand(&type5);
auto param55 = model->addOperand(&type5);
auto param56 = model->addOperand(&type5);
auto param57 = model->addOperand(&type5);
auto param58 = model->addOperand(&type5);
auto out1 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 scores1_init[] = {0.8999999761581421f, 0.10000000149011612f};
model->setOperandValue(scores1, scores1_init, sizeof(_Float16) * 2);
static _Float16 roi1_init[] = {1.0f, 1.0f, 10.0f, 10.0f, 0.0f, 0.0f, 10.0f, 10.0f};
model->setOperandValue(roi1, roi1_init, sizeof(_Float16) * 8);
static int32_t param39_init[] = {0};
model->setOperandValue(param39, param39_init, sizeof(int32_t) * 1);
static _Float16 param40_init[] = {0.30000001192092896f};
model->setOperandValue(param40, param40_init, sizeof(_Float16) * 1);
static int32_t param41_init[] = {-1};
model->setOperandValue(param41, param41_init, sizeof(int32_t) * 1);
static int32_t param42_init[] = {0};
model->setOperandValue(param42, param42_init, sizeof(int32_t) * 1);
static _Float16 param43_init[] = {0.4000000059604645f};
model->setOperandValue(param43, param43_init, sizeof(_Float16) * 1);
static _Float16 param44_init[] = {1.0f};
model->setOperandValue(param44, param44_init, sizeof(_Float16) * 1);
static _Float16 param45_init[] = {0.30000001192092896f};
model->setOperandValue(param45, param45_init, sizeof(_Float16) * 1);
static int32_t param46_init[] = {4};
model->setOperandValue(param46, param46_init, sizeof(int32_t) * 1);
static int32_t param47_init[] = {4};
model->setOperandValue(param47, param47_init, sizeof(int32_t) * 1);
static _Float16 param48_init[] = {2.0f};
model->setOperandValue(param48, param48_init, sizeof(_Float16) * 1);
static _Float16 param49_init[] = {2.0f};
model->setOperandValue(param49, param49_init, sizeof(_Float16) * 1);
static int32_t param50_init[] = {4};
model->setOperandValue(param50, param50_init, sizeof(int32_t) * 1);
static int32_t param51_init[] = {4};
model->setOperandValue(param51, param51_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 weights1_init[] = {1.0f, 3.0f, 5.0f, 7.0f, 9.0f, 11.0f, 9.0f, 7.0f, 5.0f};
model->setOperandValue(weights1, weights1_init, sizeof(_Float16) * 9);
static _Float16 bias1_init[] = {-1.5f};
model->setOperandValue(bias1, bias1_init, sizeof(_Float16) * 1);
static int32_t param52_init[] = {1};
model->setOperandValue(param52, param52_init, sizeof(int32_t) * 1);
static int32_t param53_init[] = {2};
model->setOperandValue(param53, param53_init, sizeof(int32_t) * 1);
static int32_t param54_init[] = {2};
model->setOperandValue(param54, param54_init, sizeof(int32_t) * 1);
static int32_t param55_init[] = {1};
model->setOperandValue(param55, param55_init, sizeof(int32_t) * 1);
static int32_t param56_init[] = {1};
model->setOperandValue(param56, param56_init, sizeof(int32_t) * 1);
static int32_t param57_init[] = {1};
model->setOperandValue(param57, param57_init, sizeof(int32_t) * 1);
static int32_t param58_init[] = {0};
model->setOperandValue(param58, param58_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_BOX_WITH_NMS_LIMIT, {scores1, roi1, param39, param40, param41, param42, param43, param44, param45}, {scoresOut1, roiOut1, classesOut1, batchSplitOut1});
model->addOperation(ANEURALNETWORKS_ROI_ALIGN, {in1, roiOut1, batchSplitOut1, param46, param47, param48, param49, param50, param51, layout}, {featureMap1});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {featureMap1, weights1, bias1, param52, param53, param54, param55, param56, param57, param58, layout}, {out1});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{in1},
{scoresOut1, classesOut1, out1});
assert(model->isValid());
}
bool is_ignored_zero_sized_nchw_float16_dynamic_output_shape_2(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type13);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type13);
auto op15_tmp = model->addOperand(&type1);
auto dummy600 = model->addOperand(&type9);
auto param663 = model->addOperand(&type5);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy600_init[] = {0.0f};
model->setOperandValue(dummy600, dummy600_init, sizeof(float) * 1);
static int32_t param663_init[] = {0};
model->setOperandValue(param663, param663_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy600, param663}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
auto op15_tmp = model->addOperand(&type1);
auto dummy601 = model->addOperand(&type9);
auto param664 = model->addOperand(&type5);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy601_init[] = {0.0f};
model->setOperandValue(dummy601, dummy601_init, sizeof(float) * 1);
static int32_t param664_init[] = {0};
model->setOperandValue(param664, param664_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy601, param664}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type13);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type13);
auto op15_tmp = model->addOperand(&type1);
auto dummy602 = model->addOperand(&type9);
auto param665 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type22);
auto dummy603 = model->addOperand(&type9);
auto param666 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type9);
auto dummy604 = model->addOperand(&type9);
auto param667 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy602_init[] = {0.0f};
model->setOperandValue(dummy602, dummy602_init, sizeof(float) * 1);
static int32_t param665_init[] = {0};
model->setOperandValue(param665, param665_init, sizeof(int32_t) * 1);
static float dummy603_init[] = {0.0f};
model->setOperandValue(dummy603, dummy603_init, sizeof(float) * 1);
static int32_t param666_init[] = {0};
model->setOperandValue(param666, param666_init, sizeof(int32_t) * 1);
static float dummy604_init[] = {0.0f};
model->setOperandValue(dummy604, dummy604_init, sizeof(float) * 1);
static int32_t param667_init[] = {0};
model->setOperandValue(param667, param667_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy602, param665}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy603, param666}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy604, param667}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
auto op15_tmp = model->addOperand(&type1);
auto dummy605 = model->addOperand(&type9);
auto param668 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type22);
auto dummy606 = model->addOperand(&type9);
auto param669 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type9);
auto dummy607 = model->addOperand(&type9);
auto param670 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy605_init[] = {0.0f};
model->setOperandValue(dummy605, dummy605_init, sizeof(float) * 1);
static int32_t param668_init[] = {0};
model->setOperandValue(param668, param668_init, sizeof(int32_t) * 1);
static float dummy606_init[] = {0.0f};
model->setOperandValue(dummy606, dummy606_init, sizeof(float) * 1);
static int32_t param669_init[] = {0};
model->setOperandValue(param669, param669_init, sizeof(int32_t) * 1);
static float dummy607_init[] = {0.0f};
model->setOperandValue(dummy607, dummy607_init, sizeof(float) * 1);
static int32_t param670_init[] = {0};
model->setOperandValue(param670, param670_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy605, param668}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy606, param669}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy607, param670}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type13);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type13);
auto op15_tmp = model->addOperand(&type1);
auto dummy608 = model->addOperand(&type9);
auto param671 = model->addOperand(&type5);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy608_init[] = {0.0f};
model->setOperandValue(dummy608, dummy608_init, sizeof(float) * 1);
static int32_t param671_init[] = {0};
model->setOperandValue(param671, param671_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy608, param671}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
auto op15_tmp = model->addOperand(&type1);
auto dummy609 = model->addOperand(&type9);
auto param672 = model->addOperand(&type5);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy609_init[] = {0.0f};
model->setOperandValue(dummy609, dummy609_init, sizeof(float) * 1);
static int32_t param672_init[] = {0};
model->setOperandValue(param672, param672_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy609, param672}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type13);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type13(Type::TENSOR_FLOAT32, {1, 4, 4, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type13);
auto op15_tmp = model->addOperand(&type1);
auto dummy610 = model->addOperand(&type9);
auto param673 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type22);
auto dummy611 = model->addOperand(&type9);
auto param674 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type9);
auto dummy612 = model->addOperand(&type9);
auto param675 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy610_init[] = {0.0f};
model->setOperandValue(dummy610, dummy610_init, sizeof(float) * 1);
static int32_t param673_init[] = {0};
model->setOperandValue(param673, param673_init, sizeof(int32_t) * 1);
static float dummy611_init[] = {0.0f};
model->setOperandValue(dummy611, dummy611_init, sizeof(float) * 1);
static int32_t param674_init[] = {0};
model->setOperandValue(param674, param674_init, sizeof(int32_t) * 1);
static float dummy612_init[] = {0.0f};
model->setOperandValue(dummy612, dummy612_init, sizeof(float) * 1);
static int32_t param675_init[] = {0};
model->setOperandValue(param675, param675_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy610, param673}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy611, param674}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy612, param675}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type1(Type::TENSOR_FLOAT32, {1, 2, 2, 1});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type1);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
auto op15_tmp = model->addOperand(&type1);
auto dummy613 = model->addOperand(&type9);
auto param676 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type22);
auto dummy614 = model->addOperand(&type9);
auto param677 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type9);
auto dummy615 = model->addOperand(&type9);
auto param678 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy613_init[] = {0.0f};
model->setOperandValue(dummy613, dummy613_init, sizeof(float) * 1);
static int32_t param676_init[] = {0};
model->setOperandValue(param676, param676_init, sizeof(int32_t) * 1);
static float dummy614_init[] = {0.0f};
model->setOperandValue(dummy614, dummy614_init, sizeof(float) * 1);
static int32_t param677_init[] = {0};
model->setOperandValue(param677, param677_init, sizeof(int32_t) * 1);
static float dummy615_init[] = {0.0f};
model->setOperandValue(dummy615, dummy615_init, sizeof(float) * 1);
static int32_t param678_init[] = {0};
model->setOperandValue(param678, param678_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy613, param676}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy614, param677}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy615, param678}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nhwc_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type237(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type34);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type237);
// Phase 2, operations
static uint8_t op25_init[] = {132};
model->setOperandValue(op25, op25_init, sizeof(uint8_t) * 1);
static int32_t op35_init[] = {0};
model->setOperandValue(op35, op35_init, sizeof(int32_t) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type34);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type238);
// Phase 2, operations
static uint8_t op25_init[] = {132};
model->setOperandValue(op25, op25_init, sizeof(uint8_t) * 1);
static int32_t op35_init[] = {0};
model->setOperandValue(op35, op35_init, sizeof(int32_t) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type237(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type34);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type237);
auto op15_tmp = model->addOperand(&type34);
auto dummy616 = model->addOperand(&type38);
auto param679 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op25_init[] = {132};
model->setOperandValue(op25, op25_init, sizeof(uint8_t) * 1);
static int32_t op35_init[] = {0};
model->setOperandValue(op35, op35_init, sizeof(int32_t) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy616_init[] = {100};
model->setOperandValue(dummy616, dummy616_init, sizeof(uint8_t) * 1);
static int32_t param679_init[] = {0};
model->setOperandValue(param679, param679_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy616, param679}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type34);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type238);
auto op15_tmp = model->addOperand(&type34);
auto dummy617 = model->addOperand(&type38);
auto param680 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op25_init[] = {132};
model->setOperandValue(op25, op25_init, sizeof(uint8_t) * 1);
static int32_t op35_init[] = {0};
model->setOperandValue(op35, op35_init, sizeof(int32_t) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy617_init[] = {100};
model->setOperandValue(dummy617, dummy617_init, sizeof(uint8_t) * 1);
static int32_t param680_init[] = {0};
model->setOperandValue(param680, param680_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy617, param680}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type237(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type34);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type237);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type34);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type238);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type237(Type::TENSOR_QUANT8_ASYMM, {1, 4, 4, 1}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type34);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type237);
auto op15_tmp = model->addOperand(&type34);
auto dummy618 = model->addOperand(&type38);
auto param681 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type303);
auto dummy619 = model->addOperand(&type39);
auto param682 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy618_init[] = {100};
model->setOperandValue(dummy618, dummy618_init, sizeof(uint8_t) * 1);
static int32_t param681_init[] = {0};
model->setOperandValue(param681, param681_init, sizeof(int32_t) * 1);
static uint8_t dummy619_init[] = {128};
model->setOperandValue(dummy619, dummy619_init, sizeof(uint8_t) * 1);
static int32_t param682_init[] = {0};
model->setOperandValue(param682, param682_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy618, param681}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy619, param682}, {op25});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op35, op15_tmp, op25_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type34(Type::TENSOR_QUANT8_ASYMM, {1, 2, 2, 1}, 0.5f, 100);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type34);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type238);
auto op15_tmp = model->addOperand(&type34);
auto dummy620 = model->addOperand(&type38);
auto param683 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type303);
auto dummy621 = model->addOperand(&type39);
auto param684 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy620_init[] = {100};
model->setOperandValue(dummy620, dummy620_init, sizeof(uint8_t) * 1);
static int32_t param683_init[] = {0};
model->setOperandValue(param683, param683_init, sizeof(int32_t) * 1);
static uint8_t dummy621_init[] = {128};
model->setOperandValue(dummy621, dummy621_init, sizeof(uint8_t) * 1);
static int32_t param684_init[] = {0};
model->setOperandValue(param684, param684_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy620, param683}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy621, param684}, {op25});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op35, op15_tmp, op25_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type241(Type::TENSOR_FLOAT16, {1, 4, 4, 1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
// Phase 1, operands
auto op15 = model->addOperand(&type64);
auto op25 = model->addOperand(&type277);
auto op35 = model->addOperand(&type215);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type241);
// Phase 2, operations
static _Float16 op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(_Float16) * 1);
static _Float16 op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(_Float16) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op15 = model->addOperand(&type64);
auto op25 = model->addOperand(&type277);
auto op35 = model->addOperand(&type215);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(_Float16) * 1);
static _Float16 op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(_Float16) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type241(Type::TENSOR_FLOAT16, {1, 4, 4, 1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type69);
auto op25 = model->addOperand(&type277);
auto op35 = model->addOperand(&type215);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type241);
auto op15_tmp = model->addOperand(&type69);
auto dummy622 = model->addOperand(&type70);
auto param685 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(_Float16) * 1);
static _Float16 op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(_Float16) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy622_init[] = {0.0f};
model->setOperandValue(dummy622, dummy622_init, sizeof(_Float16) * 1);
static int32_t param685_init[] = {0};
model->setOperandValue(param685, param685_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy622, param685}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type69);
auto op25 = model->addOperand(&type277);
auto op35 = model->addOperand(&type215);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type68);
auto op15_tmp = model->addOperand(&type69);
auto dummy623 = model->addOperand(&type70);
auto param686 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(_Float16) * 1);
static _Float16 op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(_Float16) * 1);
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy623_init[] = {0.0f};
model->setOperandValue(dummy623, dummy623_init, sizeof(_Float16) * 1);
static int32_t param686_init[] = {0};
model->setOperandValue(param686, param686_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy623, param686}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type241(Type::TENSOR_FLOAT16, {1, 4, 4, 1});
OperandType type304(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type64);
auto op25 = model->addOperand(&type304);
auto op35 = model->addOperand(&type70);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type241);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type304(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type64(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type64);
auto op25 = model->addOperand(&type304);
auto op35 = model->addOperand(&type70);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type241(Type::TENSOR_FLOAT16, {1, 4, 4, 1});
OperandType type304(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type69);
auto op25 = model->addOperand(&type304);
auto op35 = model->addOperand(&type70);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type241);
auto op15_tmp = model->addOperand(&type69);
auto dummy624 = model->addOperand(&type70);
auto param687 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type304);
auto dummy625 = model->addOperand(&type70);
auto param688 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type70);
auto dummy626 = model->addOperand(&type70);
auto param689 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy624_init[] = {0.0f};
model->setOperandValue(dummy624, dummy624_init, sizeof(_Float16) * 1);
static int32_t param687_init[] = {0};
model->setOperandValue(param687, param687_init, sizeof(int32_t) * 1);
static _Float16 dummy625_init[] = {0.0f};
model->setOperandValue(dummy625, dummy625_init, sizeof(_Float16) * 1);
static int32_t param688_init[] = {0};
model->setOperandValue(param688, param688_init, sizeof(int32_t) * 1);
static _Float16 dummy626_init[] = {0.0f};
model->setOperandValue(dummy626, dummy626_init, sizeof(_Float16) * 1);
static int32_t param689_init[] = {0};
model->setOperandValue(param689, param689_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy624, param687}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy625, param688}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy626, param689}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type304(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type69(Type::TENSOR_FLOAT16, {1, 2, 2, 1});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type69);
auto op25 = model->addOperand(&type304);
auto op35 = model->addOperand(&type70);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type68);
auto op15_tmp = model->addOperand(&type69);
auto dummy627 = model->addOperand(&type70);
auto param690 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type304);
auto dummy628 = model->addOperand(&type70);
auto param691 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type70);
auto dummy629 = model->addOperand(&type70);
auto param692 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 4, 4, 1};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {false};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy627_init[] = {0.0f};
model->setOperandValue(dummy627, dummy627_init, sizeof(_Float16) * 1);
static int32_t param690_init[] = {0};
model->setOperandValue(param690, param690_init, sizeof(int32_t) * 1);
static _Float16 dummy628_init[] = {0.0f};
model->setOperandValue(dummy628, dummy628_init, sizeof(_Float16) * 1);
static int32_t param691_init[] = {0};
model->setOperandValue(param691, param691_init, sizeof(int32_t) * 1);
static _Float16 dummy629_init[] = {0.0f};
model->setOperandValue(dummy629, dummy629_init, sizeof(_Float16) * 1);
static int32_t param692_init[] = {0};
model->setOperandValue(param692, param692_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy627, param690}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy628, param691}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy629, param692}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nhwc_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type245);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type245);
auto op15_tmp = model->addOperand(&type121);
auto dummy630 = model->addOperand(&type9);
auto param693 = model->addOperand(&type5);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy630_init[] = {0.0f};
model->setOperandValue(dummy630, dummy630_init, sizeof(float) * 1);
static int32_t param693_init[] = {0};
model->setOperandValue(param693, param693_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy630, param693}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
auto op15_tmp = model->addOperand(&type121);
auto dummy631 = model->addOperand(&type9);
auto param694 = model->addOperand(&type5);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy631_init[] = {0.0f};
model->setOperandValue(dummy631, dummy631_init, sizeof(float) * 1);
static int32_t param694_init[] = {0};
model->setOperandValue(param694, param694_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy631, param694}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type245);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type245);
auto op15_tmp = model->addOperand(&type121);
auto dummy632 = model->addOperand(&type9);
auto param695 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type22);
auto dummy633 = model->addOperand(&type9);
auto param696 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type9);
auto dummy634 = model->addOperand(&type9);
auto param697 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy632_init[] = {0.0f};
model->setOperandValue(dummy632, dummy632_init, sizeof(float) * 1);
static int32_t param695_init[] = {0};
model->setOperandValue(param695, param695_init, sizeof(int32_t) * 1);
static float dummy633_init[] = {0.0f};
model->setOperandValue(dummy633, dummy633_init, sizeof(float) * 1);
static int32_t param696_init[] = {0};
model->setOperandValue(param696, param696_init, sizeof(int32_t) * 1);
static float dummy634_init[] = {0.0f};
model->setOperandValue(dummy634, dummy634_init, sizeof(float) * 1);
static int32_t param697_init[] = {0};
model->setOperandValue(param697, param697_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy632, param695}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy633, param696}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy634, param697}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
auto op15_tmp = model->addOperand(&type121);
auto dummy635 = model->addOperand(&type9);
auto param698 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type22);
auto dummy636 = model->addOperand(&type9);
auto param699 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type9);
auto dummy637 = model->addOperand(&type9);
auto param700 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy635_init[] = {0.0f};
model->setOperandValue(dummy635, dummy635_init, sizeof(float) * 1);
static int32_t param698_init[] = {0};
model->setOperandValue(param698, param698_init, sizeof(int32_t) * 1);
static float dummy636_init[] = {0.0f};
model->setOperandValue(dummy636, dummy636_init, sizeof(float) * 1);
static int32_t param699_init[] = {0};
model->setOperandValue(param699, param699_init, sizeof(int32_t) * 1);
static float dummy637_init[] = {0.0f};
model->setOperandValue(dummy637, dummy637_init, sizeof(float) * 1);
static int32_t param700_init[] = {0};
model->setOperandValue(param700, param700_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy635, param698}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy636, param699}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy637, param700}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type245);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type245);
auto op15_tmp = model->addOperand(&type121);
auto dummy638 = model->addOperand(&type9);
auto param701 = model->addOperand(&type5);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy638_init[] = {0.0f};
model->setOperandValue(dummy638, dummy638_init, sizeof(float) * 1);
static int32_t param701_init[] = {0};
model->setOperandValue(param701, param701_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy638, param701}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
auto op15_tmp = model->addOperand(&type121);
auto dummy639 = model->addOperand(&type9);
auto param702 = model->addOperand(&type5);
// Phase 2, operations
static float op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(float) * 1);
static float op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(float) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy639_init[] = {0.0f};
model->setOperandValue(dummy639, dummy639_init, sizeof(float) * 1);
static int32_t param702_init[] = {0};
model->setOperandValue(param702, param702_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy639, param702}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type245);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type245(Type::TENSOR_FLOAT32, {1, 1, 4, 4});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type245);
auto op15_tmp = model->addOperand(&type121);
auto dummy640 = model->addOperand(&type9);
auto param703 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type22);
auto dummy641 = model->addOperand(&type9);
auto param704 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type9);
auto dummy642 = model->addOperand(&type9);
auto param705 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy640_init[] = {0.0f};
model->setOperandValue(dummy640, dummy640_init, sizeof(float) * 1);
static int32_t param703_init[] = {0};
model->setOperandValue(param703, param703_init, sizeof(int32_t) * 1);
static float dummy641_init[] = {0.0f};
model->setOperandValue(dummy641, dummy641_init, sizeof(float) * 1);
static int32_t param704_init[] = {0};
model->setOperandValue(param704, param704_init, sizeof(int32_t) * 1);
static float dummy642_init[] = {0.0f};
model->setOperandValue(dummy642, dummy642_init, sizeof(float) * 1);
static int32_t param705_init[] = {0};
model->setOperandValue(param705, param705_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy640, param703}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy641, param704}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy642, param705}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type121(Type::TENSOR_FLOAT32, {1, 1, 2, 2});
OperandType type22(Type::TENSOR_FLOAT32, {1, 1, 1, 1});
OperandType type27(Type::TENSOR_FLOAT32, {0, 0, 0, 0});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type9(Type::TENSOR_FLOAT32, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type121);
auto op25 = model->addOperand(&type22);
auto op35 = model->addOperand(&type9);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type27);
auto op15_tmp = model->addOperand(&type121);
auto dummy643 = model->addOperand(&type9);
auto param706 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type22);
auto dummy644 = model->addOperand(&type9);
auto param707 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type9);
auto dummy645 = model->addOperand(&type9);
auto param708 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static float dummy643_init[] = {0.0f};
model->setOperandValue(dummy643, dummy643_init, sizeof(float) * 1);
static int32_t param706_init[] = {0};
model->setOperandValue(param706, param706_init, sizeof(int32_t) * 1);
static float dummy644_init[] = {0.0f};
model->setOperandValue(dummy644, dummy644_init, sizeof(float) * 1);
static int32_t param707_init[] = {0};
model->setOperandValue(param707, param707_init, sizeof(int32_t) * 1);
static float dummy645_init[] = {0.0f};
model->setOperandValue(dummy645, dummy645_init, sizeof(float) * 1);
static int32_t param708_init[] = {0};
model->setOperandValue(param708, param708_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy643, param706}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy644, param707}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy645, param708}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
// Phase 4: set relaxed execution
model->relaxComputationFloat32toFloat16(true);
assert(model->isValid());
}
bool is_ignored_nchw_relaxed_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type247(Type::TENSOR_QUANT8_ASYMM, {1, 1, 4, 4}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type125);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type247);
// Phase 2, operations
static uint8_t op25_init[] = {132};
model->setOperandValue(op25, op25_init, sizeof(uint8_t) * 1);
static int32_t op35_init[] = {0};
model->setOperandValue(op35, op35_init, sizeof(int32_t) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type125);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type238);
// Phase 2, operations
static uint8_t op25_init[] = {132};
model->setOperandValue(op25, op25_init, sizeof(uint8_t) * 1);
static int32_t op35_init[] = {0};
model->setOperandValue(op35, op35_init, sizeof(int32_t) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type247(Type::TENSOR_QUANT8_ASYMM, {1, 1, 4, 4}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type125);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type247);
auto op15_tmp = model->addOperand(&type125);
auto dummy646 = model->addOperand(&type38);
auto param709 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op25_init[] = {132};
model->setOperandValue(op25, op25_init, sizeof(uint8_t) * 1);
static int32_t op35_init[] = {0};
model->setOperandValue(op35, op35_init, sizeof(int32_t) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy646_init[] = {100};
model->setOperandValue(dummy646, dummy646_init, sizeof(uint8_t) * 1);
static int32_t param709_init[] = {0};
model->setOperandValue(param709, param709_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy646, param709}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type125);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type238);
auto op15_tmp = model->addOperand(&type125);
auto dummy647 = model->addOperand(&type38);
auto param710 = model->addOperand(&type5);
// Phase 2, operations
static uint8_t op25_init[] = {132};
model->setOperandValue(op25, op25_init, sizeof(uint8_t) * 1);
static int32_t op35_init[] = {0};
model->setOperandValue(op35, op35_init, sizeof(int32_t) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy647_init[] = {100};
model->setOperandValue(dummy647, dummy647_init, sizeof(uint8_t) * 1);
static int32_t param710_init[] = {0};
model->setOperandValue(param710, param710_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy647, param710}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type247(Type::TENSOR_QUANT8_ASYMM, {1, 1, 4, 4}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type125);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type247);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type125);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type238);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type247(Type::TENSOR_QUANT8_ASYMM, {1, 1, 4, 4}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type125);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type247);
auto op15_tmp = model->addOperand(&type125);
auto dummy648 = model->addOperand(&type38);
auto param711 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type303);
auto dummy649 = model->addOperand(&type39);
auto param712 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy648_init[] = {100};
model->setOperandValue(dummy648, dummy648_init, sizeof(uint8_t) * 1);
static int32_t param711_init[] = {0};
model->setOperandValue(param711, param711_init, sizeof(int32_t) * 1);
static uint8_t dummy649_init[] = {128};
model->setOperandValue(dummy649, dummy649_init, sizeof(uint8_t) * 1);
static int32_t param712_init[] = {0};
model->setOperandValue(param712, param712_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy648, param711}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy649, param712}, {op25});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op35, op15_tmp, op25_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type125(Type::TENSOR_QUANT8_ASYMM, {1, 1, 2, 2}, 0.5f, 100);
OperandType type236(Type::TENSOR_INT32, {1}, 0.25f, 0);
OperandType type238(Type::TENSOR_QUANT8_ASYMM, {0, 0, 0, 0}, 16.0f, 0);
OperandType type303(Type::TENSOR_QUANT8_ASYMM, {1, 1, 1, 1}, 0.5f, 128);
OperandType type38(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 100);
OperandType type39(Type::TENSOR_QUANT8_ASYMM, {1}, 0.5f, 128);
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type125);
auto op25 = model->addOperand(&type303);
auto op35 = model->addOperand(&type236);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type238);
auto op15_tmp = model->addOperand(&type125);
auto dummy650 = model->addOperand(&type38);
auto param713 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type303);
auto dummy651 = model->addOperand(&type39);
auto param714 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static uint8_t dummy650_init[] = {100};
model->setOperandValue(dummy650, dummy650_init, sizeof(uint8_t) * 1);
static int32_t param713_init[] = {0};
model->setOperandValue(param713, param713_init, sizeof(int32_t) * 1);
static uint8_t dummy651_init[] = {128};
model->setOperandValue(dummy651, dummy651_init, sizeof(uint8_t) * 1);
static int32_t param714_init[] = {0};
model->setOperandValue(param714, param714_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy650, param713}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy651, param714}, {op25});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op35, op15_tmp, op25_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_quant8_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type249(Type::TENSOR_FLOAT16, {1, 1, 4, 4});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
// Phase 1, operands
auto op15 = model->addOperand(&type145);
auto op25 = model->addOperand(&type277);
auto op35 = model->addOperand(&type215);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type249);
// Phase 2, operations
static _Float16 op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(_Float16) * 1);
static _Float16 op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(_Float16) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_float16_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
// Phase 1, operands
auto op15 = model->addOperand(&type145);
auto op25 = model->addOperand(&type277);
auto op35 = model->addOperand(&type215);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type68);
// Phase 2, operations
static _Float16 op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(_Float16) * 1);
static _Float16 op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(_Float16) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_float16_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type249(Type::TENSOR_FLOAT16, {1, 1, 4, 4});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type147);
auto op25 = model->addOperand(&type277);
auto op35 = model->addOperand(&type215);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type249);
auto op15_tmp = model->addOperand(&type147);
auto dummy652 = model->addOperand(&type70);
auto param715 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(_Float16) * 1);
static _Float16 op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(_Float16) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy652_init[] = {0.0f};
model->setOperandValue(dummy652, dummy652_init, sizeof(_Float16) * 1);
static int32_t param715_init[] = {0};
model->setOperandValue(param715, param715_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy652, param715}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type215(Type::TENSOR_FLOAT16, {1});
OperandType type277(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type147);
auto op25 = model->addOperand(&type277);
auto op35 = model->addOperand(&type215);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type68);
auto op15_tmp = model->addOperand(&type147);
auto dummy653 = model->addOperand(&type70);
auto param716 = model->addOperand(&type5);
// Phase 2, operations
static _Float16 op25_init[] = {2.0f};
model->setOperandValue(op25, op25_init, sizeof(_Float16) * 1);
static _Float16 op35_init[] = {0.0f};
model->setOperandValue(op35, op35_init, sizeof(_Float16) * 1);
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy653_init[] = {0.0f};
model->setOperandValue(dummy653, dummy653_init, sizeof(_Float16) * 1);
static int32_t param716_init[] = {0};
model->setOperandValue(param716, param716_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy653, param716}, {op15});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type249(Type::TENSOR_FLOAT16, {1, 1, 4, 4});
OperandType type304(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type145);
auto op25 = model->addOperand(&type304);
auto op35 = model->addOperand(&type70);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type249);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type145(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type304(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type145);
auto op25 = model->addOperand(&type304);
auto op35 = model->addOperand(&type70);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type68);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15, op25, op35},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type249(Type::TENSOR_FLOAT16, {1, 1, 4, 4});
OperandType type304(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type147);
auto op25 = model->addOperand(&type304);
auto op35 = model->addOperand(&type70);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type249);
auto op15_tmp = model->addOperand(&type147);
auto dummy654 = model->addOperand(&type70);
auto param717 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type304);
auto dummy655 = model->addOperand(&type70);
auto param718 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type70);
auto dummy656 = model->addOperand(&type70);
auto param719 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy654_init[] = {0.0f};
model->setOperandValue(dummy654, dummy654_init, sizeof(_Float16) * 1);
static int32_t param717_init[] = {0};
model->setOperandValue(param717, param717_init, sizeof(int32_t) * 1);
static _Float16 dummy655_init[] = {0.0f};
model->setOperandValue(dummy655, dummy655_init, sizeof(_Float16) * 1);
static int32_t param718_init[] = {0};
model->setOperandValue(param718, param718_init, sizeof(int32_t) * 1);
static _Float16 dummy656_init[] = {0.0f};
model->setOperandValue(dummy656, dummy656_init, sizeof(_Float16) * 1);
static int32_t param719_init[] = {0};
model->setOperandValue(param719, param719_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy654, param717}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy655, param718}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy656, param719}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d
namespace generated_tests::transpose_conv2d {
void CreateModel_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(Model *model) {
OperandType type0(Type::BOOL, {});
OperandType type147(Type::TENSOR_FLOAT16, {1, 1, 2, 2});
OperandType type304(Type::TENSOR_FLOAT16, {1, 1, 1, 1});
OperandType type4(Type::TENSOR_INT32, {4});
OperandType type5(Type::INT32, {});
OperandType type68(Type::TENSOR_FLOAT16, {0, 0, 0, 0});
OperandType type70(Type::TENSOR_FLOAT16, {1});
// Phase 1, operands
auto op15 = model->addOperand(&type147);
auto op25 = model->addOperand(&type304);
auto op35 = model->addOperand(&type70);
auto shape5 = model->addOperand(&type4);
auto param59 = model->addOperand(&type5);
auto param60 = model->addOperand(&type5);
auto param61 = model->addOperand(&type5);
auto param62 = model->addOperand(&type5);
auto layout = model->addOperand(&type0);
auto op45 = model->addOperand(&type68);
auto op15_tmp = model->addOperand(&type147);
auto dummy657 = model->addOperand(&type70);
auto param720 = model->addOperand(&type5);
auto op25_tmp = model->addOperand(&type304);
auto dummy658 = model->addOperand(&type70);
auto param721 = model->addOperand(&type5);
auto op35_tmp = model->addOperand(&type70);
auto dummy659 = model->addOperand(&type70);
auto param722 = model->addOperand(&type5);
// Phase 2, operations
static int32_t shape5_init[] = {1, 1, 4, 4};
model->setOperandValue(shape5, shape5_init, sizeof(int32_t) * 4);
static int32_t param59_init[] = {1};
model->setOperandValue(param59, param59_init, sizeof(int32_t) * 1);
static int32_t param60_init[] = {2};
model->setOperandValue(param60, param60_init, sizeof(int32_t) * 1);
static int32_t param61_init[] = {2};
model->setOperandValue(param61, param61_init, sizeof(int32_t) * 1);
static int32_t param62_init[] = {0};
model->setOperandValue(param62, param62_init, sizeof(int32_t) * 1);
static bool8 layout_init[] = {true};
model->setOperandValue(layout, layout_init, sizeof(bool8) * 1);
static _Float16 dummy657_init[] = {0.0f};
model->setOperandValue(dummy657, dummy657_init, sizeof(_Float16) * 1);
static int32_t param720_init[] = {0};
model->setOperandValue(param720, param720_init, sizeof(int32_t) * 1);
static _Float16 dummy658_init[] = {0.0f};
model->setOperandValue(dummy658, dummy658_init, sizeof(_Float16) * 1);
static int32_t param721_init[] = {0};
model->setOperandValue(param721, param721_init, sizeof(int32_t) * 1);
static _Float16 dummy659_init[] = {0.0f};
model->setOperandValue(dummy659, dummy659_init, sizeof(_Float16) * 1);
static int32_t param722_init[] = {0};
model->setOperandValue(param722, param722_init, sizeof(int32_t) * 1);
model->addOperation(ANEURALNETWORKS_ADD, {op15_tmp, dummy657, param720}, {op15});
model->addOperation(ANEURALNETWORKS_ADD, {op25_tmp, dummy658, param721}, {op25});
model->addOperation(ANEURALNETWORKS_ADD, {op35_tmp, dummy659, param722}, {op35});
model->addOperation(ANEURALNETWORKS_TRANSPOSE_CONV_2D, {op15, op25, op35, shape5, param59, param60, param61, param62, layout}, {op45});
// Phase 3, inputs and outputs
model->identifyInputsAndOutputs(
{op15_tmp, op25_tmp, op35_tmp},
{op45});
assert(model->isValid());
}
bool is_ignored_nchw_float16_all_tensors_as_inputs_all_inputs_as_internal_dynamic_output_shape_5(int i) {
static std::set<int> ignore = {};
return ignore.find(i) != ignore.end();
}
} // namespace generated_tests::transpose_conv2d