Body: <p>I am reading the paper "<a href="https://i.sstatic.net/qZGnM.png" rel="nofollow noreferrer">Transformation Invariance in Pattern Recognition – Tangent Distance and Tangent Propagation</a>", where the tangent vector is calculated for the given curve <span class="math-container">$s(P,\alpha)$</span> at <span class="math-container">$\alpha=0$</span> by differentiating with respect to <span class="math-container">$\alpha$</span>, that is, <span class="math-container">$\frac{\partial s(P,\alpha)}{\partial\alpha}$</span>. For the curve, I have taken one <span class="math-container">$2D$</span> image and I am rotating it with matrix <span class="math-container">$R=\left[\matrix{cos(\alpha)\space -sin(\alpha)\\sin(\alpha) \space\space\space\space\space cos(\alpha)} \right]$</span>. </p>
  
  <p>As my image is fixed, the curve is just a function of <span class="math-container">$\alpha$</span>. Therefore, to find the tangent vector, what I am doing is as follows:</p>
  
  <ol>
  <li><p>I am rotating the image by the matrix <span class="math-container">$R^{'}$</span> which is <span class="math-container">$R^{'}=\left[\matrix{-sin(\alpha)\space -cos(\alpha)\\cos(\alpha) \space\space\space\space\space -sin(\alpha)} \right]$</span> </p></li>
  <li><p>This rotates the image by <span class="math-container">$90$</span> degree, which is not the expected result.</p></li>
  </ol>
  
  <p>I have done the same exercise by differentiating numerically and I am getting the expected answer which is as follows:<br><a href="https://i.sstatic.net/oqYUc.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oqYUc.png" alt="Picture <span class="math-container">$\alpha$</span>=0"></a> 
  <br><a href="https://i.sstatic.net/qZGnM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qZGnM.png" alt="Tangent vector plot at <span class="math-container">$\alpha$</span>=0"></a></p>
  
  <p>Please, help me to understand my mistake in taking derivative of the matrix and multiplying it with image.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-27T14:31:48.557Z
Comments.Text: What does the rotation have to do with the differentiation of the curve function?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-28T03:55:32.007Z
Comments.Text: You can see 2D image as a point in 16 X 16 dimensional space. So if you keep rotating you get a curve in 256 dimensional space wrt rotation angle. So I want to differentiate this curve wrt to rotational angle.
Comments.UserDisplayName: Arun Chauhan
Tags: <convolutional-neural-networks><computer-vision><math>
Title: Calculating tangent vector of curve s(P,$\alpha$) at given point $\alpha$ = 0
UserDisplayName: Arun Chauhan
ThreadText: # Calculating tangent vector of curve s(P,$\alpha$) at given point $\alpha$ = 0
  
  (Asked by: username_0 on 2019-02-27)
  
  I am reading the paper "[Transformation Invariance in Pattern Recognition – Tangent Distance and Tangent Propagation](https://i.sstatic.net/qZGnM.png)", where the tangent vector is calculated for the given curve $s(P,\alpha)$ at $\alpha=0$ by differentiating with respect to $\alpha$, that is, $\frac{\partial s(P,\alpha)}{\partial\alpha}$. For the curve, I have taken one $2D$ image and I am rotating it with matrix $R=\left[\matrix{cos(\alpha)\space -sin(\alpha)\\sin(\alpha) \space\space\space\space\space cos(\alpha)} \right]$.
  
  As my image is fixed, the curve is just a function of $\alpha$. Therefore, to find the tangent vector, what I am doing is as follows:
  
  1. I am rotating the image by the matrix $R^{'}$ which is $R^{'}=\left[\matrix{-sin(\alpha)\space -cos(\alpha)\\cos(\alpha) \space\space\space\space\space -sin(\alpha)} \right]$
  2. This rotates the image by $90$ degree, which is not the expected result.
  
  I have done the same exercise by differentiating numerically and I am getting the expected answer which is as follows:  
  [![Picture <span class=](https://i.sstatic.net/oqYUc.png)$\alpha$=0">](https://i.sstatic.net/oqYUc.png)
    
  [![Tangent vector plot at <span class=](https://i.sstatic.net/qZGnM.png)$\alpha$=0">](https://i.sstatic.net/qZGnM.png)
  
  Please, help me to understand my mistake in taking derivative of the matrix and multiplying it with image.
  
  **Tags:** convolutional-neural-networks, computer-vision, math
  > **Comments:**
  > **username_1**: What does the rotation have to do with the differentiation of the curve function?  
  > **username_0**: You can see 2D image as a point in 16 X 16 dimensional space. So if you keep rotating you get a curve in 256 dimensional space wrt rotation angle. So I want to differentiate this curve wrt to rotational angle.  
  
  ---
  
  ## 0 answers
  
  