class_docstr: Differentiable shape rendering layer using multiple convex polytopes.
class_docstr_tok: ["Differentiable","shape","rendering","layer","using","multiple","convex","polytopes","."]
docstr: Construct object by assembling convex polytopes differentiably.
  
  Args:
    x: Tensor, [batch_size, n_parts, n_half_planes, dims], hyperplane
      parameters.
    translations: Tensor, [batch_size, n_parts, dims], translation vectors.
    blend_terms: Tensor, [batch_size, n_parts], smoothness terms for blending
      hyperplanes.
    points: Tensor, [batch_size, n_points, dims], query points.
  
  Returns:
    indicator: Tensor, [batch_size, n_points, 1], indicators for query points.
    extra: list, contains:
      trans: Tensor, [batch_size, n_parts, dims], translations.
      imgsum: Tensor, [batch_size, n_points, 1], sum of indicators.
      offset: Tensor, [batch_size, n_parts, n_half_planes, 1], offset of
      hyperplanes.
      image_indica: Tensor, [batch_Size, n_parts, n_points, 1], per part
      indicators.
docstr_tok: ["Construct","object","by","assembling","convex","polytopes","differentiably",".","Args",":","x",":","Tensor",",","[","batch_size",",","n_parts",",","n_half_planes",",","dims","]",",","hyperplane","parameters",".","translations",":","Tensor",",","[","batch_size",",","n_parts",",","dims","]",",","translation","vectors",".","blend_terms",":","Tensor",",","[","batch_size",",","n_parts","]",",","smoothness","terms","for","blending","hyperplanes",".","points",":","Tensor",",","[","batch_size",",","n_points",",","dims","]",",","query","points",".","Returns",":","indicator",":","Tensor",",","[","batch_size",",","n_points",",","1","]",",","indicators","for","query","points",".","extra",":","list",",","contains",":","trans",":","Tensor",",","[","batch_size",",","n_parts",",","dims","]",",","translations",".","imgsum",":","Tensor",",","[","batch_size",",","n_points",",","1","]",",","sum","of","indicators",".","offset",":","Tensor",",","[","batch_size",",","n_parts",",","n_half_planes",",","1","]",",","offset","of","hyperplanes",".","image_indica",":","Tensor",",","[","batch_Size",",","n_parts",",","n_points",",","1","]",",","per","part","indicators","."]
code: def call(self, x, translations, blend_terms, points):
      """Construct object by assembling convex polytopes differentiably.
  
      Args:
        x: Tensor, [batch_size, n_parts, n_half_planes, dims], hyperplane
          parameters.
        translations: Tensor, [batch_size, n_parts, dims], translation vectors.
        blend_terms: Tensor, [batch_size, n_parts], smoothness terms for blending
          hyperplanes.
        points: Tensor, [batch_size, n_points, dims], query points.
  
      Returns:
        indicator: Tensor, [batch_size, n_points, 1], indicators for query points.
        extra: list, contains:
          trans: Tensor, [batch_size, n_parts, dims], translations.
          imgsum: Tensor, [batch_size, n_points, 1], sum of indicators.
          offset: Tensor, [batch_size, n_parts, n_half_planes, 1], offset of
          hyperplanes.
          image_indica: Tensor, [batch_Size, n_parts, n_points, 1], per part
          indicators.
      """
      points = tf.concat([points, translations], axis=1)
      signed_dis, transform, blend_planes, offset = self._compute_sdf(
          x, translations, blend_terms, points
      )
  
      # Generate convex shapes (use logsumexp as the intersection of half-spaces)
      part_logits = tf.reduce_logsumexp(
          signed_dis
          * tf.reshape(blend_planes, [-1, self._n_parts, 1, 1, 1]),
          axis=2,
      )
      part_logits = -part_logits / tf.reshape(
          blend_planes, [-1, self._n_parts, 1, 1]
      )
  
      part_indica_full = tf.nn.sigmoid(part_logits * self._sharpness)
      part_indica = part_indica_full[:, :, : -self._n_parts]
  
      image_indica_sum = tf.reduce_sum(part_indica_full, axis=1)
      image_indica_max = tf.reduce_max(part_indica, axis=1)
  
      return image_indica_max, (
          transform,
          image_indica_sum,
          offset,
          part_indica,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow.compat.v1
  from tensorflow_graphics.projects.cvxnet.lib import resnet
label_desc: Use image node_id 2 for calling the MultiConvexUnit obj's underlying member method code with example usage: obj.call(x, translations, blend_terms, points) and returns: image_indica_max,  transform,  image_indica_sum,  offset,  part_indica