You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to visualize below graph using second order differentiation by tanh function.
To realize this graph, I tried to the source code that you gave us. But this code only gives me the result that just first order differentiation graph by tanh. I wonder how to draw first, second, third, ..., and higher order differentiation. plz give me some guide. Thanks.
'''Need the dot binary from the graphviz package (www.graphviz.org).'''importnumpyasnpfromdezeroimportVariablefromdezero.utilsimportplot_dot_graphimportdezero.functionsasFx=Variable(np.array(1.0))
y=F.tanh(x)
x.name='x'y.name='y'y.backward(create_graph=True)
iters=3foriinrange(iters):
gx=x.gradx.cleargrad()
gx.backward(create_graph=True)
gx=x.gradgx.name='gx'+str(iters+1)
plot_dot_graph(gx, verbose=False, to_file='tanh.png')
The text was updated successfully, but these errors were encountered:
I want to visualize below graph using second order differentiation by tanh function.
To realize this graph, I tried to the source code that you gave us. But this code only gives me the result that just first order differentiation graph by tanh. I wonder how to draw first, second, third, ..., and higher order differentiation. plz give me some guide. Thanks.
The text was updated successfully, but these errors were encountered: