Skip to content

Commit 4bc08e3

Browse files
committed
agment.md文档整合
1 parent 450ed39 commit 4bc08e3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/zh/examples/amgnet.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,11 @@ unzip data.zip
307307
--8<--
308308
```
309309

310-
### 3.7 模型导出与推理
310+
### 3.9 模型导出与推理
311311

312312
训练完成后,我们可以将模型导出为静态图格式,并使用Python推理引擎进行部署。
313313

314-
#### 3.7.1 导出模型
314+
#### 3.9.1 导出模型
315315

316316
我们首先需要在 `amgnet_cylinder.py` 中实现 `export` 函数,它负责加载训练好的模型,并将其保存为推理所需的格式。
317317

@@ -329,7 +329,7 @@ python amgnet_cylinder.py mode=export
329329

330330
导出的模型将包含 `amgnet_cylinder.pdmodel` (模型结构) 和 `amgnet_cylinder.pdiparams` (模型权重) 文件,保存在配置文件 `INFER.export_path` 所指定的目录中。
331331

332-
#### 3.7.2 创建推理器
332+
#### 3.9.2 创建推理器
333333

334334
为了执行推理,我们创建了一个专用的 `AMGNPredictor` 类,存放于 `deploy/python_infer/amgn_predictor.py`。这个类继承自 `ppsci.deploy.base_predictor.Predictor`,并实现了加载模型和执行预测的核心逻辑。
335335

@@ -339,7 +339,7 @@ examples/amgnet/deploy/python_infer/amgn_predictor.py:28:87
339339
--8<--
340340
```
341341

342-
#### 3.7.3 执行推理
342+
#### 3.9.3 执行推理
343343

344344
最后,我们实现 `inference` 函数。该函数会实例化 `AMGNPredictor`,加载数据,并循环执行预测,最后将结果可视化。
345345

@@ -355,7 +355,7 @@ examples/amgnet/amgnet_cylinder.py:259:298
355355
python amgnet_cylinder.py mode=infer
356356
```
357357

358-
#### 3.7.4 新增配置
358+
#### 3.9.4 新增配置
359359

360360
为了支持以上功能,需要在 `conf/amgnet_cylinder.yaml` 中添加 `INFER` 配置项。
361361

0 commit comments

Comments
 (0)