KeOps Logo
1.4.1
  • Why using KeOps?
  • Installation

KeOps

  • Formulas and syntax
  • Autodiff engine
  • Changelog and Road map

PyKeOps

  • Python bindings for KeOps
  • Tutorials, applications
  • Examples
    • Numpy API
      • Sum reduction
      • Multi GPU
      • Block-sparse reductions
      • Arg-K-Min reduction
      • KernelSolve reduction
      • KernelSolve reduction (with LazyTensors)
      • SumSoftMaxWeight reduction
      • SumSoftMaxWeight reduction (with LazyTensors)
    • Pytorch API
      • Advanced syntax in formulas
      • Anisotropic kernels
      • Sum reduction
      • LogSumExp reduction
      • Vectorial LogSumExp reduction
      • Multi GPU
      • Block-sparse reductions
      • High-level kernel_product syntax
      • KernelSolve reduction
      • KernelSolve reduction (with LazyTensors)
      • SumSoftMaxWeight reduction
  • Benchmarks
  • API

RKeOps

  • R binding for KeOps

KeOpsLab

  • Matlab binding for KeOps

KeOps++

  • C++ API for KeOps

How does it work?

  • Autodiff and GPUs
  • Efficient CUDA schemes
  • Generic formulas
  • Conclusion
KeOps
  • Docs »
  • Examples
  • Edit on GitHub

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¶

../_images/sphx_glr_plot_generic_syntax_numpy_thumb.png

Sum reduction¶

../_images/sphx_glr_plot_gpu_select_numpy_thumb.png

Multi GPU¶

../_images/sphx_glr_plot_grid_cluster_numpy_thumb.png

Block-sparse reductions¶

../_images/sphx_glr_plot_test_ArgKMin_thumb.png

Arg-K-Min reduction¶

../_images/sphx_glr_plot_test_invkernel_numpy_thumb.png

KernelSolve reduction¶

../_images/sphx_glr_plot_test_invkernel_numpy_helper_thumb.png

KernelSolve reduction (with LazyTensors)¶

../_images/sphx_glr_plot_test_softmax_numpy_thumb.png

SumSoftMaxWeight reduction¶

../_images/sphx_glr_plot_test_softmax_numpy_helper_thumb.png

SumSoftMaxWeight reduction (with LazyTensors)¶

Pytorch API¶

../_images/sphx_glr_plot_advanced_formula_thumb.png

Advanced syntax in formulas¶

../_images/sphx_glr_plot_anisotropic_kernels_thumb.png

Anisotropic kernels¶

../_images/sphx_glr_plot_generic_syntax_pytorch_thumb.png

Sum reduction¶

../_images/sphx_glr_plot_generic_syntax_pytorch_LSE_thumb.png

LogSumExp reduction¶

../_images/sphx_glr_plot_generic_syntax_pytorch_LSE_vect_thumb.png

Vectorial LogSumExp reduction¶

../_images/sphx_glr_plot_gpu_select_example_thumb.png

Multi GPU¶

../_images/sphx_glr_plot_grid_cluster_pytorch_thumb.png

Block-sparse reductions¶

../_images/sphx_glr_plot_kernel_product_syntax_thumb.png

High-level kernel_product syntax¶

../_images/sphx_glr_plot_test_invkernel_torch_thumb.png

KernelSolve reduction¶

../_images/sphx_glr_plot_test_invkernel_torch_helper_thumb.png

KernelSolve reduction (with LazyTensors)¶

../_images/sphx_glr_plot_test_softmax_torch_thumb.png

SumSoftMaxWeight reduction¶

Download all examples in Python source code: _auto_examples_python.zip

Download all examples in Jupyter notebooks: _auto_examples_jupyter.zip

Gallery generated by Sphinx-Gallery

Next Previous

© Copyright 2018-2019, Benjamin Charlier, Jean Feydy, Joan A. Glaunès. Last updated on Aug 17, 2020.