提交 eb784c09 编写于 作者: B Brendan Apfeld

Prevents TypeError:'dict_keys' object does not support indexing

上级 e2fb51d1
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册