Browse Source

[to #42322933] fix forward input in token classification

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10103632
master
yuze.zyz 3 years ago
parent
commit
06787d66d8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modelscope/pipelines/nlp/word_segmentation_pipeline.py

+ 1
- 1
modelscope/pipelines/nlp/word_segmentation_pipeline.py View File

@@ -62,7 +62,7 @@ class WordSegmentationPipeline(Pipeline):
text = inputs.pop(OutputKeys.TEXT)
with torch.no_grad():
return {
**self.model(inputs, **forward_params), OutputKeys.TEXT: text
**self.model(**inputs, **forward_params), OutputKeys.TEXT: text
}

def postprocess(self, inputs: Dict[str, Any],


Loading…
Cancel
Save