docstr: Tests pooling with random data inputs.
docstr_tok: ["Tests","pooling","with","random","data","inputs","."]
code: def test_unpool_random(self, num_vertices, num_features):
      """Tests pooling with random data inputs."""
      output_vertices = num_vertices // 2
      pool_map = np.zeros(
          shape=(output_vertices, num_vertices), dtype=np.float32
      )
      for i in range(output_vertices):
          pool_map[i, (i * 2, i * 2 + 1)] = (0.5, 0.5)
      data = np.random.uniform(
          size=(output_vertices, num_features)
      ).astype(np.float32)
  
      unpooled = gp.unpool(data, _dense_to_sparse(pool_map), sizes=None)
  
      with self.subTest(name="direct_unpool"):
          true = np.zeros(shape=(num_vertices, num_features)).astype(
              np.float32
          )
          true[0::2, :] = data
          true[1::2, :] = data
          self.assertAllClose(unpooled, true)
  
      with self.subTest(name="permute_pool_map"):
          permutation = np.random.permutation(num_vertices)
          pool_map_permute = pool_map[:, permutation]
          unpooled_permute = gp.unpool(
              data, _dense_to_sparse(pool_map_permute), None
          )
          true_permute = true[permutation, :]
          self.assertAllClose(unpooled_permute, true_permute)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  import numpy
  from six.moves import range
  import tensorflow
  import tensorflow_graphics.geometry.convolution.graph_pooling
  from tensorflow_graphics.geometry.convolution.tests import utils_test
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 5 for calling the GraphPoolingTestUnpoolTests obj's underlying member method code with example usage: obj.test_unpool_random(num_vertices, num_features) without return types