def test_run(msg, tf_expr, fd):
      """Evaluate a tf expression and time that evaluation."""
      t0 = time.time()
      tf_result = session.run(tf_expr, feed_dict=fd)
      elapsed = time.time() - t0
      result_size = numpy_size(msg, tf_result)
      return elapsed, result_size
Evaluate a tf expression and time that evaluation.
language/nql/demos/gridworld_scaling/scaling_eval.py