Skip to content

Commit 8e7ab94

Browse files
siyuan.yangsophon-leevi
siyuan.yang
authored andcommitted
fix(BERT): fix doc bug
Change-Id: I8ead5f793bf4bbc721f7efd00569f1e01789abe0 (cherry picked from commit 6f591f1d76d3e7c1214b46a63cafa7c069efc859)
1 parent f0f585f commit 8e7ab94

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# bert4torch模型onnx导出
22
bert4torch模型导出是在Pytorch模型的生产环境下进行的,需提前根据[A simple training framework that recreates bert4keras in PyTorch. bert4torch](https://github.com/Tongjilibo/bert4torch/)的要求安装好Pytorch环境,准备好相应的代码和模型,并保证模型能够在Pytorch环境下正常推理运行。
3+
34
torch==1.13.0
4-
'''
5+
```python
56
import torch
67
import torchvision
78

@@ -10,4 +11,4 @@ input_data = torch.zeros([1, 256]) # generate input data
1011
output_onnx_path = 'test.onnx'
1112

1213
torch.onnx.export(model, input_data, output_onnx_path, verbose=True, opset_version=12)
13-
'''
14+
```

0 commit comments

Comments
 (0)