class_docstr: DeformableDETR model for object detection task.
code: def logits_to_probs(
      self, logits: jnp.ndarray, log_p: bool = False
  ) -> jnp.ndarray:
      is_sigmoid = self.config.get("sigmoid_loss", True)
      # We can overwrite logit normalization explicitly if we wanted to, so we
      # can normalize logits using softmax but using sigmoid loss.
      is_sigmoid = self.config.get("sigmoid_logit_norm", is_sigmoid)
      if not is_sigmoid:
          return (
              jax.nn.log_softmax(logits)
              if log_p
              else jax.nn.softmax(logits)
          )
      else:
          return (
              jax.nn.log_sigmoid(logits)
              if log_p
              else jax.nn.sigmoid(logits)
          )
  
imports: import math
  from typing import Any, Dict, Optional, Sequence, Tuple, Union
  from absl import logging
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  from scenic.model_lib import matchers
  from scenic.model_lib.base_models import base_model
  from scenic.model_lib.base_models import box_utils
  from scenic.model_lib.base_models import model_utils
  from scenic.projects.baselines.deformable_detr.backbone import DeformableDETRBackbone
  from scenic.projects.baselines.deformable_detr.backbone import InputPosEmbeddingSine
  from scenic.projects.baselines.deformable_detr.backbone import mask_for_shape
  from scenic.projects.baselines.deformable_detr.deformable_transformer import BBoxCoordPredictor
  from scenic.projects.baselines.deformable_detr.deformable_transformer import DeformableDETRTransformer
  from scenic.projects.baselines.deformable_detr.deformable_transformer import inverse_sigmoid
  from scenic.projects.baselines.deformable_detr.deformable_transformer import pytorch_kernel_init
label_desc: Use image node_id 4 for calling the DeformableDETRModel obj's underlying member method code with example usage: obj.logits_to_probs(logits, log_p) and returns: unknown, unknown