diff --git a/docs/zh_cn/quick_start/nas_tutorial_example.md b/docs/zh_cn/quick_start/nas_tutorial_example.md index 3c44640bdd393bdda14780c0af72b3da46fe399a..be9230bb9ce9fa3d57664af146a1fcee6bdd1773 100644 --- a/docs/zh_cn/quick_start/nas_tutorial_example.md +++ b/docs/zh_cn/quick_start/nas_tutorial_example.md @@ -15,6 +15,7 @@ Tips: 运行该示例前请确认已正确安装Paddle和PaddleSlim。 以下章节依次介绍每个步骤的内容。 # 1. 加载示例数据 +NEED to add more description 使用的示例数据集为cifar10,paddle框架中`paddle.dataset.cifar`包括了cifar数据集的下载和读取,代码如下: ```python import paddle @@ -28,6 +29,7 @@ eval_feeder = fluid.DataFeeder(inputs, fluid.CPUPlace()) # 2. 构建模型 +NEED to add more description ```python ### 初始化SANAS实例 sanas = slim.nas.SANAS(configs=[('MobileNetV2Space')], server_addr=("", 8337), save_checkpoint=None) @@ -60,6 +62,7 @@ with fluid.program_guard(train_program, startup_program): ``` # 3. 开始训练当前网络结构 +NEED to add more description ```python outputs = [avg_cost.name, acc_top1.name, acc_top5.name] for data in train_reader(): @@ -68,6 +71,7 @@ for data in train_reader(): ``` # 4. 开始评估当前网络结构 +NEED to add more description ```python reward = [] for data in eval_reader(): @@ -80,6 +84,7 @@ print("FINAL TEST: avg_cost: {}, acc1: {}, acc5: {}".format(finally_reward[0], f ``` # 5. 回传当前网络结构的得分 +NEED to add more description ```python sanas.reward(float(finally_reward[1])) ```