Rename Frontend to ModelFormat in documents (#265)

This commit is contained in:
Jason
2022-09-22 14:00:34 +08:00
committed by GitHub
parent 329477f825
commit 82f0d2b652
49 changed files with 118 additions and 118 deletions

View File

@@ -329,7 +329,7 @@ fd.text.uie.UIEModel(model_file,
position_prob=0.5,
max_length=128,
schema=[],
runtime_option=None,model_format=Frontend.PADDLE)
runtime_option=None,model_format=ModelFormat.PADDLE)
```
UIEModel模型加载和初始化其中`model_file`, `params_file`为训练模型导出的Paddle inference文件具体请参考其文档说明[模型导出](https://github.com/PaddlePaddle/PaddleNLP/blob/develop/model_zoo/uie/README.md#%E6%A8%A1%E5%9E%8B%E9%83%A8%E7%BD%B2)`vocab_file`为词表文件UIE模型的词表可在[UIE配置文件](https://github.com/PaddlePaddle/PaddleNLP/blob/5401f01af85f1c73d8017c6b3476242fce1e6d52/model_zoo/uie/utils.py)中下载相应的UIE模型的vocab_file。
@@ -343,7 +343,7 @@ UIEModel模型加载和初始化其中`model_file`, `params_file`为训练模
> * **max_length**(int): 输入文本的最大长度。输入文本下标超过`max_length`的部分将被截断。默认为128
> * **schema**(list|dict): 抽取任务的目标信息。
> * **runtime_option**(RuntimeOption): 后端推理配置默认为None即采用默认配置
> * **model_format**(Frontend): 模型格式默认为Paddle格式
> * **model_format**(ModelFormat): 模型格式默认为Paddle格式
### set_schema函数