<s> """<STR_LIT>""" <EOL> import tensorflow as tf <EOL> import tflearn <EOL> import tflearn . datasets . mnist as mnist <EOL> trainX , trainY , testX , testY = mnist . load_data ( one_hot = True ) <EOL> with tf . Graph ( ) . as_default ( ) : <EOL> X = tf . placeholder ( "<STR_LIT:float>" , [ None , <NUM_LIT> ] ) <EOL> Y = tf . placeholder ( "<STR_LIT:float>" , [ None , <NUM_LIT:10> ] ) <EOL> W1 = tf . Variable ( tf . random_normal ( [ <NUM_LIT> , <NUM_LIT> ] ) ) <EOL> W2 = tf . Variable ( tf . random_normal ( [ <NUM_LIT> , <NUM_LIT> ] ) ) <EOL> W3 = tf . Variable ( tf . random_normal ( [ <NUM_LIT> , <NUM_LIT:10> ] ) ) <EOL> b1 = tf . Variable ( tf . random_normal ( [ <NUM_LIT> ] ) ) <EOL> b2 = tf . Variable ( tf . random_normal ( [ <NUM_LIT> ] ) ) <EOL> b3 = tf . Variable ( tf . random_normal ( [ <NUM_LIT:10> ] ) ) <EOL> def dnn ( x ) : <EOL> x = tf . nn . tanh ( tf . add ( tf . matmul ( x , W1 ) , b1 ) ) <EOL> x = tf . nn . tanh ( tf . add ( tf . matmul ( x , W2 ) , b2 ) ) <EOL> x = tf . add ( tf . matmul ( x , W3 ) , b3 ) <EOL> return x <EOL> net = dnn ( X ) <EOL> loss = tf . reduce_mean ( tf . nn . softmax_cross_entropy_with_logits ( net , Y ) ) <EOL> optimizer = tf . train . GradientDescentOptimizer ( learning_rate = <NUM_LIT:0.1> ) <EOL> accuracy = tf . reduce_mean ( <EOL> tf . cast ( tf . equal ( tf . argmax ( net , <NUM_LIT:1> ) , tf . argmax ( Y , <NUM_LIT:1> ) ) , tf . float32 ) , <EOL> name = '<STR_LIT>' ) <EOL> trainop = tflearn . TrainOp ( loss = loss , optimizer = optimizer , <EOL> metric = accuracy , batch_size = <NUM_LIT> ) <EOL> trainer = tflearn . Trainer ( train_ops = trainop , tensorboard_verbose = <NUM_LIT:0> ) <EOL> trainer . fit ( { X : trainX , Y : trainY } , val_feed_dicts = { X : testX , Y : testY } , <EOL> n_epoch = <NUM_LIT:10> , show_metric = True ) </s>
