I think the interface would be more consistent if the function just returns a batch exactly the way the step_op receives the batch instead of having to specify the keys. In addition it would be great if we can make sure that the behavior is exactly that of the dataloader - I think this is readily achieved by using iterators.batches.deep_lod2dol
Done