Skip to content

Instantly share code, notes, and snippets.

@elumixor
Last active May 24, 2020 23:31
Show Gist options
  • Save elumixor/e14bdc88af7add877d38e577ffb4f3c0 to your computer and use it in GitHub Desktop.
Save elumixor/e14bdc88af7add877d38e577ffb4f3c0 to your computer and use it in GitHub Desktop.
def HVP(v):
return flat_grad(d_kl @ v, parameters, retain_graph=True)
search_dir = conjugate_gradient(HVP, g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment