Skip to content

Commit

Permalink
Fix: Bug on prediction for CRF model (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
monologg committed Aug 29, 2020
1 parent 8bfa415 commit a822e9f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,7 @@ def predict(pred_config):

intent_preds = np.argmax(intent_preds, axis=1)

if args.use_crf:
slot_preds = np.array(model.crf.decode(slot_logits))
else:
if not args.use_crf:
slot_preds = np.argmax(slot_preds, axis=2)

slot_label_map = {i: label for i, label in enumerate(slot_label_lst)}
Expand Down

0 comments on commit a822e9f

Please sign in to comment.