Derivative of mutual information in EMMA algorithm for image alignment
I am not an expert on mutual information but I understand a fair bit of the mathematics here.
So, I read the paper and indeed there seems some typo in the equation $(17)$. I am yet to figure that out.
But I have a way for you to compute the derivate as per equation $(17)$. So, if we go back to the equation,

then it seems that equation $17$ is essentially subtraction of the two terms above. Now, the differentiation of $\frac{d}{dT}h(v(T(x)))$ and $\frac{d}{dT}h(u(x),v(T(x)))$ can be computed using equation $16$.

So, you could develop a function (in Python or any language of your choice) as per equation $16$ and just use that function twice, once for $h(v(T(x)))$ and $h(u(x),v(T(x)))$. And then, subtract the two values. This way you wouldn't have the dimensionality issue.
Hope this was sufficient. On a side note, this is essentially an optimization problem where your cost function to optimize is the mutual information $I$. In my work on optimization problems we often do this function subtraction trick.
P.S. You can even reverse engineer and try different variations for equation $17$ and then, figure out your issue of dimensionality.