Fast, differentiable sorting and ranking in PyTorch
Torchsort Pure PyTorch implementation of Fast Differentiable Sorting and Ranking (Blondel et al.). Much of the code is copied from the original Numpy implementation at google-research/fast-soft-sort, with the isotonic regression solver rewritten as a PyTorch C++ and CUDA extension. Install pip install torchsort To build the CUDA extension you will need the CUDA toolchain installed. If youwant to build in an environment without a CUDA runtime (e.g. docker), you willneed to export the environment variableTORCH_CUDA_ARCH_LIST=”Pascal;Volta;Turing” before installing. Usage torchsort exposes […]
Read more