message: Update remapper tests for copy leakyrelu alpha
diff: @@ -568,9 +568,13 @@ TEST_F(RemapperTest, FuseConv2DWithBiasAndActivation) {
  return ops::Identity(fetch, ops::Relu6(activate, bias_add));
  } else if (activation == "Elu") {
  return ops::Identity(fetch, ops::Elu(activate, bias_add));
  + // Disable LeakyRelu temporarily before MKL PR is merged.
  +#ifndef INTEL_MKL
  } else if (activation == "LeakyRelu") {
  + auto attr = ops::internal::LeakyRelu::Alpha(0.5);
  return ops::Identity(fetch,
  - ops::internal::LeakyRelu(activate, bias_add));
  + ops::internal::LeakyRelu(activate, bias_add, attr));
  +#endif // !INTEL_MKL
  }
  return ops::Identity(fetch, bias);
  @@ -609,6 +613,12 @@ TEST_F(RemapperTest, FuseConv2DWithBiasAndActivation) {
  ASSERT_EQ(fused_ops.size(), 2);
  EXPECT_EQ(fused_ops[0], "BiasAdd");
  EXPECT_EQ(fused_ops[1], activation);
  +
  +#ifndef INTEL_MKL
  + if (activation == "LeakyRelu") {
  + EXPECT_EQ(node.attr().at("leakyrelu_alpha").f(), 0.5);
  + }
  +#endif // !INTEL_MKL
  found++;
  }
  }
  @@ -832,9 +842,13 @@ TEST_F(RemapperTest, FuseConv2DWithBatchNormAndActivation) {
  return ops::Identity(fetch, ops::Relu6(activate, batch_norm.y));
  } else if (activation == "Elu") {
  return ops::Identity(fetch, ops::Elu(activate, batch_norm.y));
  + // Disable LeakyRelu temporarily before MKL PR is merged.
  +#ifndef INTEL_MKL
  } else if (activation == "LeakyRelu") {
  + auto attr = ops::internal::LeakyRelu::Alpha(0.5);
  return ops::Identity(fetch,
  - ops::internal::LeakyRelu(activate, batch_norm.y));
  + ops::internal::LeakyRelu(activate, batch_norm.y, attr));
  +#endif // !INTEL_MKL
  }
  return ops::Identity(fetch, batch_norm.y);
  @@ -881,6 +895,12 @@ TEST_F(RemapperTest, FuseConv2DWithBatchNormAndActivation) {
  ASSERT_EQ(fused_ops.size(), 2);
  EXPECT_EQ(fused_ops[0], "FusedBatchNorm");
  EXPECT_EQ(fused_ops[1], activation);
  +
  +#ifndef INTEL_MKL
  + if (activation == "LeakyRelu") {
  + EXPECT_EQ(node.attr().at("leakyrelu_alpha").f(), 0.5);
  + }
  +#endif // !INTEL_MKL
  found++;
  }
  }
  