ray.rllib.utils.torch_utils.softmax_cross_entropy_with_logits
ray.rllib.utils.torch_utils.softmax_cross_entropy_with_logits#
- ray.rllib.utils.torch_utils.softmax_cross_entropy_with_logits(logits: Union[numpy.array, jnp.ndarray, tf.Tensor, torch.Tensor], labels: Union[numpy.array, jnp.ndarray, tf.Tensor, torch.Tensor]) Union[numpy.array, jnp.ndarray, tf.Tensor, torch.Tensor][source]#
Same behavior as tf.nn.softmax_cross_entropy_with_logits.
- Parameters
x – The input predictions.
labels – The labels corresponding to
x.
- Returns
The resulting softmax cross-entropy given predictions and labels.