docstr: Check if the convolution parameters and output have correct shapes.
docstr_tok: ["Check","if","the","convolution","parameters","and","output","have","correct","shapes","."]
code: def test_feature_steered_convolution_layer_exception_not_raised_shapes(
      self,
      batch_size,
      num_vertices,
      in_channels,
      out_channels,
      num_weight_matrices,
      translation_invariant,
  ):
      """Check if the convolution parameters and output have correct shapes."""
      data, neighbors = _dummy_data(
          batch_size, num_vertices, in_channels
      )
      name_scope = "test"
      if tf.executing_eagerly():
          layer = gc_layer.FeatureSteeredConvolutionKerasLayer(
              translation_invariant=translation_invariant,
              num_weight_matrices=num_weight_matrices,
              num_output_channels=out_channels,
              name=name_scope,
          )
  
      def _run_convolution():
          """Run the appropriate feature steered convolution layer."""
          if tf.executing_eagerly():
              try:
                  output = layer(inputs=[data, neighbors], sizes=None)
              except Exception as e:  # pylint: disable=broad-except
                  self.fail("Exception raised: %s" % str(e))
          else:
              try:
                  output = gc_layer.feature_steered_convolution_layer(
                      data=data,
                      neighbors=neighbors,
                      sizes=None,
                      translation_invariant=translation_invariant,
                      num_weight_matrices=num_weight_matrices,
                      num_output_channels=out_channels,
                      var_name=name_scope,
                  )
              except Exception as e:  # pylint: disable=broad-except
                  self.fail("Exception raised: %s" % str(e))
          return output
  
      output = _run_convolution()
      output_shape = output.shape.as_list()
      out_channels = (
          in_channels if out_channels is None else out_channels
      )
  
      self.assertEqual(output_shape[-1], out_channels)
      self.assertAllEqual(output_shape[:-1], data.shape[:-1])
  
      def _get_var_shape(var_name):
          """Get the shape of a variable by name."""
          if tf.executing_eagerly():
              trainable_variables = layer.trainable_variables
              for tv in trainable_variables:
                  if tv.name == name_scope + "/" + var_name + ":0":
                      return tv.shape.as_list()
              raise ValueError("Variable not found.")
          else:
              with tf.compat.v1.variable_scope(name_scope, reuse=True):
                  variable = tf.compat.v1.get_variable(
                      var_name, initializer=tf.constant(0)
                  )
                  return variable.shape.as_list()
  
      self.assertAllEqual(
          _get_var_shape("u"), [in_channels, num_weight_matrices]
      )
      self.assertAllEqual(_get_var_shape("c"), [num_weight_matrices])
      self.assertAllEqual(_get_var_shape("b"), [out_channels])
      self.assertAllEqual(
          _get_var_shape("w"),
          [num_weight_matrices, in_channels, out_channels],
      )
      if not translation_invariant:
          self.assertAllEqual(
              _get_var_shape("v"), [in_channels, num_weight_matrices]
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  from six.moves import range
  from six.moves import zip
  import tensorflow
  import tensorflow_graphics.nn.layer.graph_convolution
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 1 for calling the GraphConvolutionTestFeatureSteeredConvolutionLayerTests obj's underlying member method code with example usage: obj.test_feature_steered_convolution_layer_exception_not_raised_shapes(batch_size, num_vertices, in_channels, out_channels, num_weight_matrices, translation_invariant) and returns: output, variable, tv