Skip to content

Commit

Permalink
updated activations scaling tests
Browse files Browse the repository at this point in the history
  • Loading branch information
e-ddykim committed Dec 3, 2024
1 parent 2f77bf8 commit f7262b4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ TEST_F(TransformationTestsF, ScaleDownSingleLayerTest) {
{
auto input = std::make_shared<ov::op::v0::Parameter>(ov::element::f16, ov::PartialShape{1, 3, 16, 16});
auto weights_const = ov::op::v0::Constant::create(ov::element::f16, ov::Shape{3, 3, 3, 3}, {1});
auto scale_down_const = ov::op::v0::Constant::create(ov::element::f16, ov::Shape{1}, {1.f / scale_factor});
auto scale_down_const = ov::op::v0::Constant::create(ov::element::f16, ov::Shape{}, {1.f / scale_factor});
auto scale_down = std::make_shared<ov::op::v1::Multiply>(input, scale_down_const);
auto conv = std::make_shared<ov::op::v1::Convolution>(scale_down,
weights_const,
Strides{},
CoordinateDiff{},
CoordinateDiff{},
Strides{});
auto scale_up_const = ov::op::v0::Constant::create(ov::element::f16, ov::Shape{1}, {scale_factor});
auto scale_up_const = ov::op::v0::Constant::create(ov::element::f16, ov::Shape{}, {scale_factor});
auto scale_up = std::make_shared<ov::op::v1::Multiply>(conv, scale_up_const);
auto convert = std::make_shared<ov::op::v0::Convert>(scale_up, ov::element::f32);
auto result = std::make_shared<ov::op::v0::Result>(convert);
Expand All @@ -67,7 +67,7 @@ TEST_F(TransformationTestsF, ScaleDownSingleLayerTest) {
TEST_F(TransformationTestsF, ScaleDownFusionTest) {
float scale_factor = 128.f;
{
ov::Shape scale_const_shape = {1};
ov::Shape scale_const_shape = {};
std::vector<float> scale_down_value = {1.f / scale_factor};
std::shared_ptr<ov::Node> scale_down_const =
std::make_shared<ov::op::v0::Constant>(ov::element::f16, scale_const_shape, scale_down_value);
Expand All @@ -91,7 +91,7 @@ TEST_F(TransformationTestsF, ScaleDownFusionTest) {
manager.register_pass<ov::pass::activations_scaling::ScaleDownFusion>(scale_factor);
}
{
ov::Shape scale_const_shape = {1};
ov::Shape scale_const_shape = {};
std::vector<float> scale_down_value = {1.f / scale_factor};
std::shared_ptr<ov::Node> scale_down_const =
std::make_shared<ov::op::v0::Constant>(ov::element::f16, scale_const_shape, scale_down_value);
Expand Down

0 comments on commit f7262b4

Please sign in to comment.