https://github.com/aliutkus/torchinterp1d
1D interpolation for pytorch
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.0%) to scientific vocabulary
Repository
1D interpolation for pytorch
Basic Info
- Host: GitHub
- Owner: aliutkus
- License: bsd-3-clause
- Language: Python
- Default Branch: master
- Size: 39.1 KB
Statistics
- Stars: 172
- Watchers: 3
- Forks: 23
- Open Issues: 18
- Releases: 1
Metadata Files
README.md
torchinterp1d
CUDA 1-D interpolation for Pytorch
Requires PyTorch >= 1.6 (due to torch.searchsorted).
Presentation
This repository implements an interp1d function that overrides torch.autograd.Function, enabling
linear 1D interpolation on the GPU for Pytorch.
def interp1d(x, y, xnew, out=None)
This function returns interpolated values of a set of 1-D functions at the desired query points xnew.
It works similarly to Matlab™ or scipy functions with
the linear interpolation mode on, except that it parallelises over any number of desired interpolation problems and exploits CUDA on the GPU
Parameters for interp1d
x: a (N, ) or (D, N) Pytorch Tensor: Either 1-D or 2-D. It contains the coordinates of the observed samples.y: (N,) or (D, N) Pytorch Tensor. Either 1-D or 2-D. It contains the actual values that correspond to the coordinates given byx. The length ofyalong its last dimension must be the same as that ofxxnew: (P,) or (D, P) Pytorch Tensor. Either 1-D or 2-D. If it is not 1-D, its length along the first dimension must be the same as that of whicheverxandyis 2-D. x-coordinates for which we want the interpolated output.out: (D, P) Pytorch Tensor` Tensor for the output. If None: allocated automatically.
Results
a Pytorch tensor of shape (D, P), containing the interpolated values.
Installation
Type pip install -e . in the root folder of this repo.
Usage
Basically simply calle torchinterp1d.interp1d.
Try out python test.py in the examples folder.
Solving 100000 interpolation problems: each with 100 observations and 30 desired values
CPU: 8060.260ms, GPU: 70.735ms, error: 0.000000%.
Owner
- Name: Antoine Liutkus
- Login: aliutkus
- Kind: user
- Location: France
- Company: @INRIA
- Repositories: 7
- Profile: https://github.com/aliutkus
Researcher at Inria
GitHub Events
Total
- Watch event: 5
- Issue comment event: 1
- Pull request event: 1
- Fork event: 4
Last Year
- Watch event: 5
- Issue comment event: 1
- Pull request event: 1
- Fork event: 4
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Antoine Liutkus | a****s@i****r | 34 |
| Dominik Engel | d****l@m****e | 3 |
| Rémy Abergel | R****l@p****r | 1 |
| Ondřej Cífka | c****o | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 20
- Total pull requests: 5
- Average time to close issues: 6 months
- Average time to close pull requests: 7 days
- Total issue authors: 20
- Total pull request authors: 5
- Average comments per issue: 2.35
- Average comments per pull request: 0.8
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- twangnh (1)
- catubc (1)
- rtavenar (1)
- pmelchior (1)
- tseep (1)
- JCBrouwer (1)
- pfeatherstone (1)
- JulianYlli12 (1)
- adam-coogan (1)
- stefangroha (1)
- varun19299 (1)
- cifkao (1)
- diyiiyiii (1)
- ZhangGongjie (1)
- iago-lito (1)
Pull Request Authors
- remy-abergel (2)
- ybh1998 (1)
- xeTaiz (1)
- aliutkus (1)
- cifkao (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 163 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: torchinterp1d
An interp1d implementation for pytorch
- Homepage: https://github.com/aliutkus/torchinterp1d
- Documentation: https://torchinterp1d.readthedocs.io/
- License: bsd-3-clause
-
Latest release: 1.1
published about 2 years ago
Rankings
Maintainers (1)
Dependencies
- torch >=1.6