Skip to content

Commit

Permalink
Merge pull request #88 from guoyuqi/master
Browse files Browse the repository at this point in the history
Update data_utils.py
  • Loading branch information
crownpku authored Apr 10, 2019
2 parents 976a528 + 57433d5 commit 3dd2039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NER_IDCNN_CRF/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def sort_and_pad(self, data, batch_size):
sorted_data = sorted(data, key=lambda x: len(x[0]))
batch_data = list()
for i in range(num_batch):
batch_data.append(self.pad_data(sorted_data[i*batch_size : (i+1)*batch_size]))
batch_data.append(self.pad_data(sorted_data[int(i*batch_size) : int((i+1)*batch_size)]))
return batch_data

@staticmethod
Expand Down

0 comments on commit 3dd2039

Please sign in to comment.