Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to see gradient function? #587

Open
Samuel-Bachorik opened this issue Jan 7, 2023 · 1 comment
Open

Is it possible to see gradient function? #587

Samuel-Bachorik opened this issue Jan 7, 2023 · 1 comment

Comments

@Samuel-Bachorik
Copy link

Samuel-Bachorik commented Jan 7, 2023

Hi, when I use autograd, it is possible to see its gradient function? Or in other words, it is possible to see derivative of that function? Or is it possible to see computational graph?

For example, I want to see grad_tanh function

import autograd.numpy as np  # Thinly-wrapped numpy
from autograd import grad    # The only autograd function you may ever need

def tanh(x):                 # Define a function
       y = np.exp(-2.0 * x)
       return (1.0 - y) / (1.0 + y)

grad_tanh = grad(tanh)       # Obtain its gradient function

Thank you

@Bornesf
Copy link

Bornesf commented Feb 26, 2023

Have you got the answer? I have the same problem. I need to get the formula of the first derivative of the function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Samuel-Bachorik @Bornesf and others