提交 9744d4c7 编写于 作者: Z zhanghan17

update readme

上级 33df1dc6
...@@ -30,11 +30,13 @@ The **ERNIE-Gram** paper has been accepted for **NAACL-HLT 2021**, for more deta ...@@ -30,11 +30,13 @@ The **ERNIE-Gram** paper has been accepted for **NAACL-HLT 2021**, for more deta
### Quick Tour ### Quick Tour
```shell ```shell
import numpy as np mkdir -p data
import paddle as P cd data
pooled, encoded = model(ids) # eager execution wget https://ernie-github.cdn.bcebos.com/data-xnli.tar.gz
print(pooled.numpy()) # convert results to numpy tar xf data-xnli.tar.gz
cd ..
#demo for NLI task
sh ernie_gram/run_cls.sh ernie_gram/task_configs/xnli_conf
``` ```
### Setup ### Setup
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
### 快速上手(待补充运行示例) ### 快速上手(待补充运行示例)
```shell ```shell
import numpy as np mkdir -p data
import paddle as P cd data
from ernie.tokenizing_ernie import ErnieTokenizer wget https://ernie-github.cdn.bcebos.com/data-xnli.tar.gz
from ernie.modeling_ernie import ErnieModel tar xf data-xnli.tar.gz
cd ..
model = ErnieModel.from_pretrained('ernie-gram') # Try to get #demo for NLI task
sh ernie_gram/run_cls.sh ernie_gram/task_configs/xnli_conf
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册