Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
04faec7b
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
04faec7b
编写于
6月 03, 2018
作者:
L
likesiwell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix reamde
上级
4862c7b0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
2 deletion
+8
-2
distill_knowledge/README.cn.md
distill_knowledge/README.cn.md
+1
-1
distill_knowledge/README.md
distill_knowledge/README.md
+1
-1
distill_knowledge/mnist_prepare.py
distill_knowledge/mnist_prepare.py
+6
-0
未找到文件。
distill_knowledge/README.cn.md
浏览文件 @
04faec7b
...
@@ -109,7 +109,7 @@ def mlp_student(img, drop_prob, h_size):
...
@@ -109,7 +109,7 @@ def mlp_student(img, drop_prob, h_size):
| StudentNet 30units with 4.0temp soft targets | 97.01% |
| StudentNet 30units with 4.0temp soft targets | 97.01% |
训练过程中的测试集准确率如下图所示,可以看到使用soft targets训练的小网络的收敛速度快于不使用soft targets的网络。
训练过程中的测试集准确率如下图所示,可以看到使用soft targets训练的小网络的收敛速度快于不使用soft targets的网络。
![
收敛
](
https://github.com/likesiwell/models/blob/d
evelop
/distill_knowledge/images/plots.png
)
![
收敛
](
https://github.com/likesiwell/models/blob/d
istill-branch
/distill_knowledge/images/plots.png
)
## 参考文献
## 参考文献
...
...
distill_knowledge/README.md
浏览文件 @
04faec7b
...
@@ -110,7 +110,7 @@ When we train the small network with soft targets of temperature 4.0, we get the
...
@@ -110,7 +110,7 @@ When we train the small network with soft targets of temperature 4.0, we get the
| StudentNet 30units with 4.0temp soft targets | 97.01% |
| StudentNet 30units with 4.0temp soft targets | 97.01% |
The testing accuracy during training procedure are visualized here. We can see that using soft targets speed up the convergence.
The testing accuracy during training procedure are visualized here. We can see that using soft targets speed up the convergence.
![
convergence
](
https://github.com/likesiwell/models/blob/d
evelop
/distill_knowledge/images/plots.png
)
![
convergence
](
https://github.com/likesiwell/models/blob/d
istill-branch
/distill_knowledge/images/plots.png
)
...
...
distill_knowledge/mnist_prepare.py
浏览文件 @
04faec7b
import
paddle
import
paddle
import
numpy
as
np
import
numpy
as
np
import
os
reader
=
paddle
.
dataset
.
mnist
.
train
()
reader
=
paddle
.
dataset
.
mnist
.
train
()
img_list
=
[]
img_list
=
[]
label_list
=
[]
label_list
=
[]
...
@@ -23,6 +24,11 @@ test_x = np.vstack(img_list)
...
@@ -23,6 +24,11 @@ test_x = np.vstack(img_list)
test_y
=
np
.
vstack
(
label_list
)
test_y
=
np
.
vstack
(
label_list
)
print
(
test_x
.
shape
,
test_y
.
shape
)
print
(
test_x
.
shape
,
test_y
.
shape
)
if
not
os
.
path
.
exits
(
'./data/'
):
os
.
makedirs
(
'./data/'
)
if
not
os
.
path
.
exits
(
'./models/'
):
os
.
makedirs
(
'./models'
)
np
.
savez
(
np
.
savez
(
'./data/mnist.npz'
,
'./data/mnist.npz'
,
train_x
=
train_x
,
train_x
=
train_x
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录