提交 ec438407 编写于 作者: C ceci3

update

上级 88e63295
......@@ -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]))
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册