Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
David Levin committed Oct 29, 2020
1 parent e98ba16 commit 2896ec4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Here <img src="images/01f349799d08738b3ed7187a8adfa8b7.svg?invert_in_darkmode" a

<p align="center"><img src="images/57354dd3723345bfc2d7b2a89dd465a7.svg?invert_in_darkmode" align=middle width=301.91657265pt height=81.88967819999999pt/></p>

Keep in mind when looking at this formula is **DON'T PANIC**. It's a straight forward application of the chain rule, just a little nastier than usual. The final thing to remember is that **I am giving you the code to compute SVD derivatives in dsvd.h/dsvd.cpp**.
When looking at this formula **DON'T PANIC**. It's a straight forward application of the chain rule, just a little nastier than usual. Also remember that **I am giving you the code to compute SVD derivatives in dsvd.h/dsvd.cpp**.

If we define the svd of a matrix as <img src="images/b93e9b71beaf724ff1d0f85841e9ae61.svg?invert_in_darkmode" align=middle width=81.59062395pt height=27.6567522pt/>, this code returns <img src="images/bfdc1036a225b1cba16ea97fa96d82de.svg?invert_in_darkmode" align=middle width=110.94409754999998pt height=28.92634470000001pt/>, <img src="images/a0d1fd43ad34510636923359f83becfa.svg?invert_in_darkmode" align=middle width=111.34893495pt height=28.92634470000001pt/> and <img src="images/c019432b974b538f20a9d3cb38176a2d.svg?invert_in_darkmode" align=middle width=94.03493055pt height=28.92634470000001pt/>. Yes this code returns 3 and four dimensional tensors storing this quantities, yes I said never to do this in class, consider this the exception that makes the rule. The latter two indices on each tensor are the <img src="images/77a3b857d53fb44e33b53e4c8b68351a.svg?invert_in_darkmode" align=middle width=5.663225699999989pt height=21.68300969999999pt/> and <img src="images/36b5afebdba34564d884d347484ac0c7.svg?invert_in_darkmode" align=middle width=7.710416999999989pt height=21.68300969999999pt/> indices used in the formula above.

Expand Down
2 changes: 1 addition & 1 deletion README.tex.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Here $\mbox{diag}\left(\right)$ takes a $3\times 1$ vector as input and converts

$$ \mathbf{ds}_{ij} = \begin{bmatrix}\frac{\partial^2 \psi}{\partial s_0^2} & \frac{\partial^2 \psi}{\partial s_0\partial s_1} & \frac{\partial^2 \psi}{\partial s_0\partial s_2} \\ \frac{\partial^2 \psi}{\partial s_0\partial s_1} & \frac{\partial^2 \psi}{\partial s_1^2} & \frac{\partial^2 \psi}{\partial s_1\partial s_2} \\ \frac{\partial^2 \psi}{\partial s_0\partial s_2} & \frac{\partial^2 \psi}{\partial s_1\partial s_12} & \frac{\partial^2 \psi}{\partial s_2^2}\end{bmatrix}\begin{bmatrix} \frac{\partial s_0}{\partial F_{ij}} \\ \frac{\partial s_1}{\partial F_{ij}} \\ \frac{\partial s_2}{\partial F_{ij}}\end{bmatrix}$$

Keep in mind when looking at this formula is **DON'T PANIC**. It's a straight forward application of the chain rule, just a little nastier than usual. The final thing to remember is that **I am giving you the code to compute SVD derivatives in dsvd.h/dsvd.cpp**.
When looking at this formula **DON'T PANIC**. It's a straight forward application of the chain rule, just a little nastier than usual. Also remember that **I am giving you the code to compute SVD derivatives in dsvd.h/dsvd.cpp**.

If we define the svd of a matrix as $F = USV^T$, this code returns $\frac{\partial U}{\partial F}\in\mathcal{R}^{3\times 3 \times 3 \times 3}$, $\frac{\partial V}{\partial F}\in\mathcal{R}^{3\times 3 \times 3 \times 3}$ and $\frac{\partial S}{\partial F}\in\mathcal{R}^{3\times 3 \times 3}$. Yes this code returns 3 and four dimensional tensors storing this quantities, yes I said never to do this in class, consider this the exception that makes the rule. The latter two indices on each tensor are the $i$ and $j$ indices used in the formula above.

Expand Down

0 comments on commit 2896ec4

Please sign in to comment.