1

I'm trying to convert a Seq2Seq model I've run locally to use Tensorflow distrubution capabilities using Estimator and Experiment. The basic feature and targets are set up as follows:

for every input and response (translation or prompt and response):
  raw input -> tokenized input -> tokenized response -> raw response

Note:

  • features will have a shape [number of buckets][number inputs @ bucket size][size of bucket for input]
  • targets will have a shape [number of buckets][number responses @ bucket size][size of bucket for response]

A few questions:

  1. Generally, are the Experiment class and Estimator interface recommended for handling this sort of model?
  2. Can I set a training batch size with Experiment? It seems train_steps and eval_steps 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?
  3. I'm assuming the Experiment train_input_fn and eval_input_fn can be any input_fn 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 model_fn expects those shapes and can properly return loss from them. Is this correct?
Eric H.
  • 6,894
  • 8
  • 43
  • 62
  • It seems the **train** graph and **infer** graph are different from each other. Even, if you export the graph upon training, you could not use that graph for Inference. Correct me if I'm wrong. – Sathyamoorthy R Mar 11 '19 at 09:39

0 Answers0