docstr: Manual test by printing out intermediate result of a small random tensor.
  
  Since _GetExpectedFractionalAvgPoolResult is 'automated', it feels safer to
  have a test case that you can see what's happening.
  This test will generate a small, random, int 2D matrix, and feed it to
  FractionalAvgPool and _GetExpectedFractionalAvgPoolResult.
code: def _testVisually(self):
      """Manual test by printing out intermediate result of a small random tensor.
  
      Since _GetExpectedFractionalAvgPoolResult is 'automated', it feels safer to
      have a test case that you can see what's happening.
      This test will generate a small, random, int 2D matrix, and feed it to
      FractionalAvgPool and _GetExpectedFractionalAvgPoolResult.
      """
      num_rows = 6
      num_cols = 6
      tensor_shape = (1, num_rows, num_cols, 1)
      pseudo_random = False
      for overlapping in True, False:
          print("-" * 70)
          print(
              "Testing FractionalAvgPool with overlapping = {}".format(
                  overlapping
              )
          )
          rand_mat = self._PRNG.randint(10, size=tensor_shape)
          pooling_ratio = [1, math.sqrt(2), math.sqrt(2), 1]
          with self.cached_session() as sess:
              p, r, c = nn_ops.fractional_avg_pool_v2(
                  rand_mat.astype(np.float32),
                  pooling_ratio,
                  pseudo_random,
                  overlapping,
                  seed=self._SEED,
              )
              tensor_output, row_seq, col_seq = self.evaluate([p, r, c])
              expected_result = (
                  self._GetExpectedFractionalAvgPoolResult(
                      rand_mat.astype(np.float32),
                      row_seq,
                      col_seq,
                      overlapping,
                  )
              )
              print("row sequence:")
              print(row_seq)
              print("column sequence:")
              print(col_seq)
  
              print("Input:")
              # Print input with pooling region marked.
              for i in range(num_rows):
                  row_to_print = []
                  for j in range(num_cols):
                      if j in col_seq:
                          row_to_print.append("|")
                      row_to_print.append(str(rand_mat[0, i, j, 0]))
                  row_to_print.append("|")
                  if i in row_seq:
                      print("-" * 2 * len(row_to_print))
                  print(" ".join(row_to_print))
              print("-" * 2 * len(row_to_print))
  
              print("Output from FractionalAvgPool:")
              print(tensor_output[0, :, :, 0])
              print("Expected result:")
              print(expected_result[0, :, :, 0])
  
imports: import math
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  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 nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the FractionalAvgTest obj's underlying member method code with example usage: obj._testVisually() without return types