code: def testSwishGrad(self):
      features = constant_op.constant(
          [[-2, -1, 1, 3]], dtype=dtypes.float32
      )
      beta = constant_op.constant(0.25, dtype=dtypes.float32)
  
      with self.cached_session():
          theoretical, numerical = gradient_checker_v2.compute_gradient(
              nn_impl.swish, [features, beta]
          )
          error = gradient_checker_v2.max_error(theoretical, numerical)
          self.assertLess(error, 1e-4)
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import nn_grad
  from tensorflow.python.ops import nn_impl
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the SwishGradOpTest obj's underlying member method code with example usage: obj.testSwishGrad() without return types