<s> __author__ = '<STR_LIT>' <EOL> from scipy import tanh <EOL> from pybrain . structure . modules . neuronlayer import NeuronLayer <EOL> class TanhLayer ( NeuronLayer ) : <EOL> """<STR_LIT>""" <EOL> def _forwardImplementation ( self , inbuf , outbuf ) : <EOL> outbuf [ : ] = tanh ( inbuf ) <EOL> def _backwardImplementation ( self , outerr , inerr , outbuf , inbuf ) : <EOL> inerr [ : ] = ( <NUM_LIT:1> - outbuf ** <NUM_LIT:2> ) * outerr </s>
