Examples
These short examples showcase the features of the pykeops.numpy
and pykeops.torch
modules,
from automatic differentiation to block-sparse reductions.
Note
If you run a KeOps script for the first time, the internal engine may take a few minutes to compile all the relevant formulas. Do not worry: this work is done once and for all as KeOps stores the resulting shared object files (‘.so’) in a cache directory.
Numpy API
Sum reduction
GPU Selection
Block-sparse reductions
Arg-K-Min reduction
KernelSolve reduction
KernelSolve reduction (with LazyTensors)
KernelSolve reduction (with LazyTensors)
SumSoftMaxWeight reduction
SumSoftMaxWeight reduction (with LazyTensors)
SumSoftMaxWeight reduction (with LazyTensors)
Pytorch API
Advanced syntax in formulas
Anisotropic kernels
Sum reduction
LogSumExp reduction
Vectorial LogSumExp reduction
Multi GPU
Block-sparse reductions
GPU Selection
KernelSolve reduction
KernelSolve reduction (with LazyTensors)
KernelSolve reduction (with LazyTensors)
SumSoftMaxWeight reduction