parameters: (logits, is_binary=False)
return_statement: return nn.Softmax(axis=-1)(logits)
docstring: converts logits into probabilities.
      Args:
          logits (Tensor)
          is_binary (bool)
docstring_summary: converts logits into probabilities.
      Args:
          logits (Tensor)
          is_binary (bool)
docstring_tokens: converts logits into probabilities . Args : logits ( Tensor ) is_binary ( bool )
function: def logits_to_probs(logits, is_binary=False):
      """
      converts logits into probabilities.
      Args:
          logits (Tensor)
          is_binary (bool)
      """
      if is_binary:
          return nn.Sigmoid()(logits)
      return nn.Softmax(axis=-1)(logits)
function_tokens: def logits_to_probs ( logits , is_binary = False ) : if is_binary : return nn . Sigmoid ( ) ( logits ) return nn . Softmax ( axis = - 1 ) ( logits )