From ec438407929da9b95b128fe8117395a669bb6c4f Mon Sep 17 00:00:00 2001 From: ceci3 <592712189@qq.com> Date: Thu, 4 Jun 2020 07:49:25 +0000 Subject: [PATCH] update --- docs/zh_cn/quick_start/nas_tutorial_example.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/zh_cn/quick_start/nas_tutorial_example.md b/docs/zh_cn/quick_start/nas_tutorial_example.md index 3c44640b..be9230bb 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])) ``` -- GitLab