def run_epoch(sess, cost_op, ops, reset, num_unrolls):
 start = timer()
 sess.run(reset)
 for _ in xrange(num_unrolls):
  cost = sess.run(([cost_op] + ops))[0]
 return ((timer() - start), cost)

def run_epoch ( sess , cost_op , ops , reset , num_unrolls ) : start = timer ( ) sess . run ( reset ) for _ in xrange ( num_unrolls ) : cost = sess . run ( ( [ cost_op ] + ops ) ) [ 0 ] return ( ( timer ( ) - start ) , cost )
runs one optimization epoch .