onnxruntime/test/contrib_ops/quantize_linear_test.cc
TEST(DequantizeLinearOpTest, DequantizeLinear_0) {
  OpTester test("DequantizeLinear", 1, onnxruntime::kMSDomain);
  std::vector<int64_t> dims{4};
  test.AddInput<uint8_t>("x", dims, {0, 3, 128, 255});
  test.AddInput<float>("x_scale", {}, {2.0f});
  test.AddInput<uint8_t>("x_zero_point", {}, {128});
  test.AddOutput<float>("y", dims, {-256.0f, -250.0f, 0.0f, 254.0f});
  test.Run();
}
// scalar zero & scale with uint8
scalar zero & scale with uint8
scalar zero & scale with uint8
TEST(DequantizeLinearOpTest, DequantizeLinear_0) {
  OpTester test("DequantizeLinear", 1, onnxruntime::kMSDomain);
  std::vector<int64_t> dims{4};
  test.AddInput<uint8_t>("x", dims, {0, 3, 128, 255});
  test.AddInput<float>("x_scale", {}, {2.0f});
  test.AddInput<uint8_t>("x_zero_point", {}, {128});
  test.AddOutput<float>("y", dims, {-256.0f, -250.0f, 0.0f, 254.0f});
  test.Run();
}
TEST ( DequantizeLinearOpTest , DequantizeLinear_0 ) { OpTester test ( " " , 1 , onnxruntime :: kMSDomain ) ; std :: vector < int64_t > dims { 4 } ; test . AddInput < uint8_t > ( " " , dims , { 0 , 3 , 128 , 255 } ) ; test . AddInput < float > ( " " , { } , { 2.0f } ) ; test . AddInput < uint8_t > ( " " , { } , { 128 } ) ; test . AddOutput < float > ( " " , dims , { -256.0f , -250.0f , 0.0f , 254.0f } ) ; test . Run ( ) ; }
scalar zero & scale with uint8
scalar zero & scale with uint8