Merge pull request #90 from fastnlp/fix-batch

fix bug
This commit is contained in:
Yige XU 2018-09-28 14:28:14 +08:00 committed by GitHub
commit 281b5671fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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