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:
- Generally, are the Experiment class and Estimator interface recommended for handling this sort of model?
- Can I set a training batch size with Experiment? It seems
train_steps
andeval_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? - I'm assuming the Experiment
train_input_fn
andeval_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'smodel_fn
expects those shapes and can properly return loss from them. Is this correct?