Fix the instance norm test input size bug in layout infer test (#661)
Correct gamma and beta size in InstanceNorm.nhwc case Type: Bug Fix Issue: 37103 Signed-off-by: Feiyue Chen <Feiyue.Chen@verisilicon.com>
This commit is contained in:
parent
74e2740daa
commit
517397949d
|
|
@ -229,7 +229,7 @@ TEST(InstanceNorm, nhwc) {
|
|||
auto src_graph = ctx->CreateGraph();
|
||||
|
||||
tim::vx::ShapeType io_shape({2, 2, 2, 2}); //nhwc
|
||||
tim::vx::ShapeType param_shape({1});
|
||||
tim::vx::ShapeType param_shape({2});
|
||||
tim::vx::TensorSpec input_spec(tim::vx::DataType::FLOAT32,
|
||||
io_shape, tim::vx::TensorAttribute::INPUT);
|
||||
tim::vx::TensorSpec param_spec(tim::vx::DataType::FLOAT32,
|
||||
|
|
@ -245,8 +245,8 @@ TEST(InstanceNorm, nhwc) {
|
|||
std::vector<float> in_data = {
|
||||
0.0f, 1.0f, 0.0f, 2.0f, 0.0f, 2.0f, 0.0f, 4.0f, 1.0f, -1.0f, -1.0f, 2.0f, -1.0f, -2.0f, 1.0f, 4.0f
|
||||
};
|
||||
std::vector<float> beta = {0};
|
||||
std::vector<float> gamma = {1.0f};
|
||||
std::vector<float> beta = {0,0};
|
||||
std::vector<float> gamma = {1.0f,1.0f};
|
||||
std::vector<float> golden = {
|
||||
0.0f, -1.1470304f, 0.0f, -0.22940612f, 0.0f, -0.22940612f, 0.0f, 1.6058424f, 0.99995005f,
|
||||
-0.7337929f, -0.99995005f, 0.52413774f, -0.99995005f, -1.1531031f, 0.99995005f, 1.3627582f,
|
||||
|
|
|
|||
Loading…
Reference in New Issue