From 756c09ef358b42a0856020da8bd139d09ac1f0fd Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Mon, 29 Jul 2019 17:23:35 +0800 Subject: [PATCH] Update reader.py (#2883) --- .../deep_attention_matching_net/utils/reader.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PaddleNLP/unarchived/deep_attention_matching_net/utils/reader.py b/PaddleNLP/unarchived/deep_attention_matching_net/utils/reader.py index 700ac09c..b581acc1 100644 --- a/PaddleNLP/unarchived/deep_attention_matching_net/utils/reader.py +++ b/PaddleNLP/unarchived/deep_attention_matching_net/utils/reader.py @@ -188,11 +188,11 @@ def make_one_batch_input(data_batches, index): feeding dictionary """ - turns = np.array(data_batches["turns"][index]) - tt_turns_len = np.array(data_batches["tt_turns_len"][index]) - every_turn_len = np.array(data_batches["every_turn_len"][index]) - response = np.array(data_batches["response"][index]) - response_len = np.array(data_batches["response_len"][index]) + turns = np.array(data_batches["turns"][index]).astype('int64') + tt_turns_len = np.array(data_batches["tt_turns_len"][index]).astype('int64') + every_turn_len = np.array(data_batches["every_turn_len"][index]).astype('int64') + response = np.array(data_batches["response"][index]).astype('int64') + response_len = np.array(data_batches["response_len"][index]).astype('int64') batch_size = turns.shape[0] max_turn_num = turns.shape[1] -- GitLab