title: Running tensorflow as daemon and piping all output to log file
body: <p>To run tensorflow model as daemon I use : </p>
  
  <pre><code>nohup python translate.py --data_dir data &amp;
  </code></pre>
  
  <p>This logs error messages to nohup.out but it does not capture Tensorflow stdout . This thread offers describes related : <a href="https://groups.google.com/a/tensorflow.org/forum/#!topic/discuss/SO_JRts-VIs" rel="nofollow">https://groups.google.com/a/tensorflow.org/forum/#!topic/discuss/SO_JRts-VIs</a> but does not provide solution.</p>
  
  <p>I require to run as daemon as model takes quite some time to run. This is to prevent ssh disconnecting due to inactivity.</p>
  
  <p>How to run Tensorflow as daemon process and pipe all output to file ?</p>