Commit 6ad5b97d authored by Jayaram Bobba's avatar Jayaram Bobba Committed by Scott Cyphers

Use validated call in the quantization unit test and the correct shape (#1590)

parent bb6de284
......@@ -176,10 +176,10 @@ void DequantizeTest(int input, float min, float max, float expected_output)
auto f = make_shared<Function>(r, op::ParameterVector{A});
auto backend = runtime::Backend::create("CPU");
// Create some tensors for input/output
auto a = backend->create_tensor(element::from<T>(), Shape{});
auto a = backend->create_tensor(element::from<T>(), Shape{1});
copy_data(a, a_data);
auto result = backend->create_tensor(element::f32, Shape{});
backend->call(f, {result}, {a});
auto result = backend->create_tensor(element::f32, Shape{1});
backend->call_with_validate(f, {result}, {a});
EXPECT_EQ((vector<float>{expected_output}), read_vector<float>(result));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment