class_docstr: Tests the Grappler remapper optimizer.
docstr: Test two Conv2D patterns and only the second is fusable.
code: def test_two_conv2d_fusions(self):
      """Test two Conv2D patterns and only the second is fusable."""
      if not test_util.is_gpu_available(
          cuda_only=True, min_cuda_compute_capability=(8, 0)
      ):
          self.skipTest(
              "No GPU with compute compatibility >= 8.0 available"
          )
  
      N, H, W, C = (5, 3, 3, 8)  # pylint: disable=invalid-name
  
      ops.reset_default_graph()
      x_shape = [N, C, H, W]
      x_format, b_format = ("NCHW", "NC..")
  
      x = _input(x_shape)
      w = _weight([2, 2, C, C])
      b = _bias([C])
  
      y = nn_ops.conv2d(
          x, w, strides=(1, 1), padding="SAME", data_format=x_format
      )
      y = nn.bias_add(y, b, data_format=b_format)
      y = nn.leaky_relu(y)
      y = nn_ops.conv2d(
          y, w, strides=(1, 1), padding="SAME", data_format=x_format
      )
      y = nn.bias_add(y, b, data_format=b_format)
      y = nn.relu(y)
      out = array_ops.identity(y)
  
      # The first Conv-BiasAdd-LeakyRelu is not fusable because cuDNN requires
      # fp16 for this pattern. The second Conv-BiasAdd-Relu is fusable.
      epilog_ops = [b"BiasAdd", b"Relu"]
      fused_op = ["_FusedConv2D"]
      self._VerifyValues(out, False, fused_op, epilog_ops)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import parameterized
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import meta_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.grappler import tf_optimizer
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import sysconfig
  from tensorflow.python.platform import test
  from tensorflow.python.util import _pywrap_utils
label_desc: Use image node_id 7 for calling the RemapperTest obj's underlying member method code with example usage: obj.test_two_conv2d_fusions() without return types