TorchCurves treats parametric curves as learnable PyTorch primitives
Original title: TorchCurves: Differentiable Parametric Curves
The library maps scalar batches to B-spline or Legendre curves and differentiates through inputs and coefficients.
Researchers present TorchCurves, a PyTorch library that treats vector-valued parametric curves as learnable primitives. Its core operation maps batches of scalar inputs to points on B-spline or Legendre polynomial curves, with differentiation through both inputs and coefficients. Coefficients can be optimized with a surrounding model or produced by another network. Timing tests compare curve evaluation with NumPy and SciPy and KAN training with EfficientKAN. The code is on GitHub.
- Trainable modules, reusable basis modules, and a functional interface are included.
- Uses include continuous embeddings, Kolmogorov-Arnold networks, and functional regression.
- Implementation uses classical evaluation plus vectorized PyTorch, without custom kernels.
- Overhead is practical for some sizes and substantial for others.
- Code is at github.com/alexshtf/torchcurves.
From the original article
1 min read at huggingface.coWe present TorchCurves, a PyTorch library that treats vector-valued parametric curves as learnable primitives. Its central operation maps batches of scalar inputs to points on curves represented in B-spline or Legendre polynomial bases, with differentiation through both inputs and coefficients. Curve coefficients can be optimized jointly with the surrounding model or produced by another network.
By Alex Shtoff · huggingface.co
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.