title: Batching Seq2Seq model with Tensorflow Experiment
body: <p>I'm trying to convert a <a href="https://www.tensorflow.org/tutorials/seq2seq" rel="nofollow noreferrer">Seq2Seq model</a> I've run locally to use Tensorflow distrubution capabilities using <a href="https://www.tensorflow.org/extend/estimators" rel="nofollow noreferrer">Estimator</a> and <a href="https://www.tensorflow.org/api_docs/python/tf/contrib/learn/Experiment" rel="nofollow noreferrer">Experiment</a>. The basic feature and targets are set up as follows:</p>
  
  <pre><code>for every input and response (translation or prompt and response):
    raw input -&gt; tokenized input -&gt; tokenized response -&gt; raw response
  </code></pre>
  
  <p>Note:</p>
  
  <ul>
  <li>features will have a shape [number of buckets][number inputs @ bucket size][size of bucket for input]</li>
  <li>targets will have a shape [number of buckets][number responses @ bucket size][size of bucket for response]</li>
  </ul>
  
  <p>A few questions:</p>
  
  <ol>
  <li>Generally, are the Experiment class and Estimator interface recommended for handling this sort of model?</li>
  <li>Can I set a training batch size with Experiment? It seems <code>train_steps</code> and <code>eval_steps</code> relate to iterations of training and evaluation. Is there another option that sets a batch size for those steps, or does Experiment compute a batch size internally/automatically?</li>
  <li>I'm assuming the Experiment <code>train_input_fn</code> and <code>eval_input_fn</code> can be any <a href="https://www.tensorflow.org/get_started/input_fn" rel="nofollow noreferrer">input_fn</a> that returns a feature dictionary and target tensor. In the case above, I really only need one feature tensor and one target tensor, which, since I am creating a custom Estimator, can be any shape so long as my Estimator's <code>model_fn</code> expects those shapes and can properly return loss from them. Is this correct?</li>
  </ol>