<s> from __future__ import absolute_import <EOL> import autograd . numpy as np <EOL> import matplotlib . pyplot as plt <EOL> from autograd import elementwise_grad <EOL> def tanh ( x ) : <EOL> return ( <NUM_LIT:1.0> - np . exp ( - x ) ) / ( <NUM_LIT:1.0> + np . exp ( - x ) ) <EOL> d_fun = elementwise_grad ( tanh ) <EOL> dd_fun = elementwise_grad ( d_fun ) <EOL> ddd_fun = elementwise_grad ( dd_fun ) <EOL> dddd_fun = elementwise_grad ( ddd_fun ) <EOL> ddddd_fun = elementwise_grad ( dddd_fun ) <EOL> dddddd_fun = elementwise_grad ( ddddd_fun ) <EOL> x = np . linspace ( - <NUM_LIT:7> , <NUM_LIT:7> , <NUM_LIT:200> ) <EOL> plt . plot ( x , tanh ( x ) , <EOL> x , d_fun ( x ) , <EOL> x , dd_fun ( x ) , <EOL> x , ddd_fun ( x ) , <EOL> x , dddd_fun ( x ) , <EOL> x , ddddd_fun ( x ) , <EOL> x , dddddd_fun ( x ) ) <EOL> plt . axis ( '<STR_LIT>' ) <EOL> plt . savefig ( "<STR_LIT>" ) <EOL> plt . show ( ) </s>
