Skip to content

Commit

Permalink
Update data_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyuqi authored Oct 19, 2018
1 parent 976a528 commit 57433d5
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 57433d5

Please sign in to comment.