diff --git a/NER_IDCNN_CRF/data_utils.py b/NER_IDCNN_CRF/data_utils.py index 71d7c21..a7fe708 100644 --- a/NER_IDCNN_CRF/data_utils.py +++ b/NER_IDCNN_CRF/data_utils.py @@ -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