code: def __call__(self, prediction, gt, sample):
      indices = sample["indices"]
      b, num_classes = tf.shape(prediction)[0], tf.shape(prediction)[-1]
      predicted_centers = tf.gather(
          tf.reshape(prediction, [b, -1, num_classes]),
          indices,
          batch_dims=1,
      )
  
      if not self.soft_shape_labels:
          gt = tf.one_hot(tf.cast(gt, tf.int32), num_classes)
          cross_entropy_loss = tf.keras.losses.CategoricalCrossentropy(
              from_logits=True,
              label_smoothing=self.label_smoothing,
              reduction=tf.keras.losses.Reduction.NONE,
          )
          loss = cross_entropy_loss(gt, predicted_centers)
      else:
          gt = tf.cast(sample["shapes_soft"], dtype=tf.float32)
          gt = tf.reshape(gt, [b, -1, num_classes])
          loss = tf.nn.sigmoid_cross_entropy_with_logits(
              logits=predicted_centers, labels=gt
          )
      if self.reduce_batch:
          loss = tf.reduce_mean(loss)
      else:
          loss = tf.reduce_mean(loss, axis=[1])
      return loss
  
label_desc: Use image node_id 2 for calling the CrossEntropyLoss obj's underlying member method code with example usage: obj.__call__(prediction, gt, sample) and returns: loss