torchcell.losses.multi_dim_nan_tolerant.fast_soft_sort
- fast_soft_sort(values: Tensor, regularization_strength: float = 1.0) Tensor[source]
Fast differentiable sorting that follows the original paper’s implementation.
- Parameters:
values – 1D tensor to sort
regularization_strength – Controls how close to hard sorting (lower = closer)
- Returns:
Soft-sorted tensor