From 5271a38008ae9db906b27c9f8db447186dabb052 Mon Sep 17 00:00:00 2001 From: codekansas Date: Fri, 22 Jul 2016 23:58:28 -0700 Subject: [PATCH] bug in randomizing --- seq2seq/answer_to_question.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seq2seq/answer_to_question.py b/seq2seq/answer_to_question.py index d67fb15..4510a75 100644 --- a/seq2seq/answer_to_question.py +++ b/seq2seq/answer_to_question.py @@ -132,7 +132,8 @@ if __name__ == '__main__': i = 0 question_idx = np.zeros(shape=(batch_size, question_maxlen, len(qa.vocab))) answer_idx = np.zeros(shape=(batch_size, answer_maxlen)) - for s in random.shuffle(questions): + random.shuffle(questions) + for s in questions: if test: ans = s['good'] else: