This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def Rop(y, x, v): | |
"""Computes an Rop. | |
Arguments: | |
y (Variable): output of differentiated function | |
x (Variable): differentiated input | |
v (Variable): vector to be multiplied with Jacobian from the right | |
""" | |
w = torch.ones_like(y, requires_grad=True) | |
return torch.autograd.grad(torch.autograd.grad(y, x, w), w, v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% This part goes in preamble | |
\newcommand{\dummyfig}[1]{ | |
\centering | |
\fbox{ | |
\begin{minipage}[c][0.33\textheight][c]{0.5\textwidth} | |
\centering{#1} | |
\end{minipage} | |
} | |
} |