<s> '''<STR_LIT>''' <EOL> import tensorflow as tf <EOL> import tflearn <EOL> import unittest <EOL> class TestActivations ( unittest . TestCase ) : <EOL> '''<STR_LIT>''' <EOL> PLACES = <NUM_LIT:4> <EOL> def test_linear ( self ) : <EOL> f = tflearn . linear <EOL> x = tf . placeholder ( tf . float32 , shape = ( ) ) <EOL> self . assertEqual ( f ( x ) , x ) <EOL> x = tf . placeholder ( tf . int64 , shape = ( ) ) <EOL> self . assertEqual ( f ( x ) , x ) <EOL> def test_tanh ( self ) : <EOL> f = tflearn . tanh <EOL> x = tf . placeholder ( tf . float32 , shape = ( ) ) <EOL> with tf . Session ( ) as sess : <EOL> self . assertEqual ( sess . run ( f ( x ) , feed_dict = { x : <NUM_LIT:0> } ) , <NUM_LIT:0> ) <EOL> self . assertAlmostEqual ( sess . run ( f ( x ) , feed_dict = { x : <NUM_LIT:0.5> } ) , <EOL> <NUM_LIT> , places = TestActivations . PLACES ) <EOL> self . assertAlmostEqual ( sess . run ( f ( x ) , feed_dict = { x : - <NUM_LIT> } ) , <EOL> - <NUM_LIT> , places = TestActivations . PLACES ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
