class_docstr: Tests for FractionalMaxPoolGrad.
  
  Two types of tests for FractionalMaxPoolGrad.
  1) Test fractional_max_pool_grad() directly.
    This type of test relies on gen_nn_ops.max_pool_grad() returns the correct
  result. For example:
    * input_tensor_shape = (1, 10, 10, 1)
    * window_size = (1, 2, 2, 1)
    * stride_size = (1, 2, 2, 1)
    * padding: not really import, since 10/2 is divisible
  max pooling should generate the same result as fractional max pooling with:
    * row_sequence = [0, 2, 4, 6, 8, 10]
    * col_sequence = [0, 2, 4, 6, 8, 10]
    * overlapping = False
  This also means their gradients in such case will be the same.
  
    Similarly, when
    * input_tensor_shape = (1, 7, 7, 1)
    * window_size = (1, 3, 3, 1)
    * stride_size = (1, 2, 2, 1)
    * padding: not important
  max pooling should generate the same result as fractional max pooling with:
    * row_sequence = [0, 2, 4, 7]
    * col_sequence = [0, 2, 4, 7]
    * overlapping = True
  2) Test through compute_gradient_error()
docstr: Generate 'unique' random input tensor.
  
  'Unique' means there's no collision values in the tensor, all elements are
  different. This is done by generating sequence of integers with step of 1
  and then randomly shuffle these integers.
  
  Args:
    shape: Shape of the tensor desired.
  
  Returns:
    A numpy ndarray with size = shape and dtype = numpy.float32.
docstr_tok: ["Generate","'unique","'","random","input","tensor",".","'Unique","'","means","there","'s","no","collision","values","in","the","tensor",",","all","elements","are","different",".","This","is","done","by","generating","sequence","of","integers","with","step","of","1","and","then","randomly","shuffle","these","integers",".","Args",":","shape",":","Shape","of","the","tensor","desired",".","Returns",":","A","numpy","ndarray","with","size","=","shape","and","dtype","=","numpy.float32","."]
code: def _GenerateUniqueRandomInputTensor(self, shape):
      """Generate 'unique' random input tensor.
  
      'Unique' means there's no collision values in the tensor, all elements are
      different. This is done by generating sequence of integers with step of 1
      and then randomly shuffle these integers.
  
      Args:
        shape: Shape of the tensor desired.
  
      Returns:
        A numpy ndarray with size = shape and dtype = numpy.float32.
      """
      num_elements = 1
      for size in shape:
          num_elements *= size
      x = np.arange(num_elements, dtype=np.float32)
      self._PRNG.shuffle(x)
      return x.reshape(shape)
  
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 1 for calling the FractionalMaxPoolGradTest obj's underlying member method code with example usage: obj._GenerateUniqueRandomInputTensor(shape) and returns: x