HIPS / autograd

Efficiently computes derivatives of numpy code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with Interpolation Autograd Friendly

NicolasBlancoV opened this issue · comments

Hi

First of all, I have a function and I want to derivate it using the "grad" function of Autograd. The input respect to which I want to derivate is a matrix (20x10).

In order to obtain the output I first need to use this matrix to make a bivariate interpolation, in particular a bivariate spline cubic in one axis and linear in the other one. For this I have used several functions of scipy (charging import autograd.scipy.special as sc and then sc.scipy.interpolate....) and it works well until I use the "grad" functions, which returns me errors as if those functions were not Autograd-friendly. I have used RectBivariateSpline, SmoothBivariateSpline, Bisplrep, and in everyone I obtain errors when I use grad.

I want to know if there is any way of doing bivariate interpolation (bilinear if it is the only one avaliable) which works with autograd or I will have to implement it by myself.

Thanks