NMTKD / translation /OpenNMT-py /onmt /tests /utils_for_tests.py
sakharamg's picture
Uploading all files
158b61b
import itertools
def product_dict(**kwargs):
keys = kwargs.keys()
vals = kwargs.values()
for instance in itertools.product(*vals):
yield dict(zip(keys, instance))