Skip to content

Commit f6b3cca

Browse files
authored
fix data type for ddparser output (#2422)
1 parent 5abaaec commit f6b3cca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddlenlp/taskflow/dependency_parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def _postprocess(self, inputs):
337337
arcs = inputs['arcs']
338338
rels = inputs['rels']
339339
words = inputs['words']
340-
arcs = [[s for s in seq] for seq in arcs]
340+
arcs = [[s.item() for s in seq] for seq in arcs]
341341
rels = [self.rel_vocab.to_tokens(seq) for seq in rels]
342342

343343
results = []

0 commit comments

Comments
 (0)