Skip to content

Commit

Permalink
fix epoches num
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyr committed Aug 15, 2019
1 parent 3f2b78e commit 3161e28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def predict(self, texts):
is_multi = config.task_info.label_type == ClassificationType.MULTI_LABEL
for line in codecs.open(sys.argv[2], "r", predictor.dataset.CHARSET):
input_texts.append(line.strip("\n"))
epoches = math.ceil(int(len(input_texts)/batch_size))
epoches = math.ceil(len(input_texts)/batch_size)
for i in range(epoches):
batch_texts = input_texts[i*batch_size:(i+1)*batch_size]
predict_prob = predictor.predict(batch_texts)
Expand Down

0 comments on commit 3161e28

Please sign in to comment.