code: def testGradient(self):
      with self.cached_session():
          x = constant_op.constant(
              [-0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 0.5, 0.7, 0.9],
              shape=[2, 5],
              name="x",
          )
          y = nn_ops.softplus(x, name="softplus")
          x_init = np.asarray(
              [
                  [-0.9, -0.7, -0.5, -0.3, -0.1],
                  [0.1, 0.3, 0.5, 0.7, 0.9],
              ],
              dtype=np.float32,
              order="F",
          )
          err = gradient_checker.compute_gradient_error(
              x, [2, 5], y, [2, 5], x_init_value=x_init
          )
      print("softplus (float) gradient err = ", err)
      self.assertLess(err, 1e-4)
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/nn_ops/softplus_op_test.py
imports: import numpy
  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 gradient_checker
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the SoftplusTest obj's underlying member method code with example usage: obj.testGradient() without return types