From 29fe62a959d23c2671a7e3aad4f8038b6118c03a Mon Sep 17 00:00:00 2001 From: Yunfan Shao Date: Fri, 28 Sep 2018 12:52:14 +0800 Subject: [PATCH] fix bug --- fastNLP/core/batch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastNLP/core/batch.py b/fastNLP/core/batch.py index 8a73b132..98d7c8da 100644 --- a/fastNLP/core/batch.py +++ b/fastNLP/core/batch.py @@ -82,6 +82,6 @@ class Batch(object): batch_origin_length[name + "_origin_len"] = torch.LongTensor(origin_lengths[name]) batch_x.update(batch_origin_length) - self.curidx += endidx + self.curidx = endidx return batch_x, batch_y