torch-dxdt Documentationο
torch-dxdt - PyTorch Differentiable Numerical Differentiation
A PyTorch implementation of numerical differentiation methods for noisy time series data.
Featuresο
π₯ Fully Differentiable: All methods support PyTorch autograd for backpropagation
π GPU Accelerated: Leverage PyTorchβs GPU support for fast computation
π Multiple Methods: Seven differentiation algorithms for different use cases
π Higher-Order Derivatives: Support for 2nd-order and multi-order derivative computation
π§ Easy API: Simple functional and object-oriented interfaces
π§ͺ Well Tested: Validated against the reference
derivativepackage
Quick Exampleο
import torch
import torch_dxdt
t = torch.linspace(0, 2 * torch.pi, 100)
x = torch.sin(t) + 0.1 * torch.randn(100)
# Compute derivative
dx = torch_dxdt.dxdt(x, t, kind="savitzky_golay", window_length=11, polyorder=3)