code: def softargmax(y, voxels, beta=50):
      """Softargmax class.
  
      Args:
        y:      float [batch_size, num_objects, num_shapes]
        voxels: float [num_shapes, 32, 32, 32]
        beta:   float scalar
  
      Returns:
        Softargmax
      """
      batch_size = y.shape[0]
      num_objects = y.shape[1]
      num_shapes = y.shape[2]
      softmax = tf.nn.softmax(beta * y)
      softmax = tf.reshape(
          softmax, [batch_size, num_objects, num_shapes, 1]
      )
      voxels = tf.reshape(voxels, [1, num_shapes, -1])
      result = tf.reduce_sum(voxels * softmax, axis=2)
      return result
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/models/centernet_utils.py
imports: import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: softargmax(y, voxels, beta) and returns: result