Hello, I am currently trying to implement a MLP with a custom layer.
This custom layer takes as input a sequence of 2d points p and a parameterization t for these points
and approximates the sequence of points p using B-Splines functions. The loss is then calculated as the
distance between the sequence of points p and the approximation calculated by this approach.
Checking Scipy’s documentation I found
https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.BSpline.html#scipy.interpolate.BSpline 13
which allows you to represent a B-spline and
https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.make_lsq_spline.html 10
usable to approximate a sequence of points provided with parameterization using B-splines.
So I was wondering in what way I could implement this layer in PyTorch in order to correctly perform
backpropagation. It is possible to somehow reuse the methods in the links above that use Numpy arrays
or is it necessary to implement these operations using PyTorch Tensors?