diff --git a/research/skip_thoughts/skip_thoughts/data/preprocess_dataset.py b/research/skip_thoughts/skip_thoughts/data/preprocess_dataset.py index dfca7e8468971bcefe709cf0338697397790c5fd..b6f304f5301808177ae0f8ee59fb466d285b9217 100644 --- a/research/skip_thoughts/skip_thoughts/data/preprocess_dataset.py +++ b/research/skip_thoughts/skip_thoughts/data/preprocess_dataset.py @@ -121,8 +121,8 @@ def _build_vocabulary(input_files): tf.logging.info("Processed %d sentences total", num) - words = wordcount.keys() - freqs = wordcount.values() + words = list(wordcount) + freqs = list(wordcount.values()) sorted_indices = np.argsort(freqs)[::-1] vocab = collections.OrderedDict()