code: def nasa_mlp(points, hparams, dims=256, shared=False):
      """Multi-layer perception for NASA.
  
      Args:
        points: tf.Tensor, [batch_size, n_parts, n_points, n_dims], query points.
        hparams: hyperparameters as absl.flags.FLAGS.
        dims: int, the dimension of hidden features within the MLP.
        shared: bool, true if share the MLP across branches.
  
      Returns:
        point_indicators: tf.Tensor, [batch, n_points, 1].
        point_perpart_indicators: tf.Tensor, [batch, n_parts, n_points, 1].
      """
      batch_size = points.shape[0]
      n_parts = points.shape[1]
      n_points = tf.shape(points)[2]
      n_point_dims = points.shape[-1]
  
      widths = [dims, dims, dims, dims, 1]
      n_widths = len(widths)
      indicators = []
      for idx in range(n_parts):
          x = points[:, idx]
          x = tf.reshape(x, [-1, n_point_dims])
          branch_id = 0 if shared else idx
          with tf.variable_scope(
              "branch_{}".format(branch_id), reuse=tf.AUTO_REUSE
          ):
              for i, dim in enumerate(widths):
                  residual = x
                  x = tf.layers.dense(
                      inputs=x,
                      units=dim,
                      activation=None,
                      name="fc_layer_{}".format(i),
                  )
                  if i == 0:
                      x = tf.nn.leaky_relu(x, alpha=0.1)
                  elif i < n_widths - 1:
                      x = tf.nn.leaky_relu(x + residual, alpha=0.1)
          indicators.append(tf.reshape(x, [batch_size, n_points, 1]))
      x = tf.stack(indicators, axis=1)
      # Sigmoid Activation
      x = tf.nn.sigmoid(x)
      x_parts = x
      if hparams.soft_blend < 0.0:
          # Max Blending
          x = tf.reduce_max(x, axis=1)
      else:
          # Soft-Max Blending
          weights = tf.nn.softmax(hparams.soft_blend * x, axis=1)
          x = tf.reduce_sum(weights * x, axis=1)
      return x, x_parts
  
file_path: graphics/tensorflow_graphics/projects/nasa/lib/model_utils.py
imports: import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling a global function with example usage: nasa_mlp(points, hparams, dims, shared) and returns: x,  x_parts