Browse Source

Merge pull request #90 from fastnlp/fix-batch

fix bug
tags/v0.1.0
Yige XU GitHub 6 years ago
parent
commit
281b5671fb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      fastNLP/core/batch.py

+ 1
- 1
fastNLP/core/batch.py 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


Loading…
Cancel
Save