Skip to content

Commit 281b567

Browse files
authored
Merge pull request #90 from fastnlp/fix-batch
fix bug
2 parents c4dbc7b + 29fe62a commit 281b567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fastNLP/core/batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ def __next__(self):
8282
batch_origin_length[name + "_origin_len"] = torch.LongTensor(origin_lengths[name])
8383
batch_x.update(batch_origin_length)
8484

85-
self.curidx += endidx
85+
self.curidx = endidx
8686
return batch_x, batch_y
8787

0 commit comments

Comments
 (0)