DiffEqML / torchdyn

A PyTorch library entirely dedicated to neural differential equations, implicit models and related numerical methods
https://torchdyn.org
Apache License 2.0
1.35k stars 125 forks source link

torchdyn.transforms #152

Closed Zymrael closed 1 year ago

Zymrael commented 2 years ago

Adds discrete cosine transforms (type-I and II for now) and an nn.Module API. Explicit transforms precompute the matrix for efficiency at a memory cost. Starting point: https://github.com/zh217/torch-dct/blob/master/torch_dct/_dct.py.

This is prep before adding neural operator and T1 layers, here and in diffeqml-models.

The goal is to have a solid selection of transforms in functional and nn.Module format that can be plugged into neural operator layers.

@fedebotu to follow in case you are interested in playing around with some other transforms previously discussed.