未验证 提交 92b3e1c2 编写于 作者: B Bai Yifan 提交者: GitHub

fix quick start (#390)

上级 115bbda5
...@@ -25,7 +25,7 @@ This tutorial trains and verifies distillation model on the MNIST dataset. The i ...@@ -25,7 +25,7 @@ This tutorial trains and verifies distillation model on the MNIST dataset. The i
Select `ResNet50` as the teacher to perform distillation training on the students of the` MobileNet` architecture. Select `ResNet50` as the teacher to perform distillation training on the students of the` MobileNet` architecture.
```python ```python
model = models.__dict__['MobileNet']() model = slim.models.MobileNet()
student_program = fluid.Program() student_program = fluid.Program()
student_startup = fluid.Program() student_startup = fluid.Program()
with fluid.program_guard(student_program, student_startup): with fluid.program_guard(student_program, student_startup):
...@@ -42,7 +42,7 @@ with fluid.program_guard(student_program, student_startup): ...@@ -42,7 +42,7 @@ with fluid.program_guard(student_program, student_startup):
```python ```python
teacher_model = models.__dict__['ResNet50']() model = slim.models.ResNet50()
teacher_program = fluid.Program() teacher_program = fluid.Program()
teacher_startup = fluid.Program() teacher_startup = fluid.Program()
with fluid.program_guard(teacher_program, teacher_startup): with fluid.program_guard(teacher_program, teacher_startup):
......
...@@ -27,7 +27,7 @@ import paddleslim as slim ...@@ -27,7 +27,7 @@ import paddleslim as slim
选择`ResNet50`作为teacher对`MobileNet`结构的student进行蒸馏训练。 选择`ResNet50`作为teacher对`MobileNet`结构的student进行蒸馏训练。
```python ```python
model = models.__dict__['MobileNet']() model = slim.models.MobileNet()
student_program = fluid.Program() student_program = fluid.Program()
student_startup = fluid.Program() student_startup = fluid.Program()
with fluid.program_guard(student_program, student_startup): with fluid.program_guard(student_program, student_startup):
...@@ -44,7 +44,7 @@ with fluid.program_guard(student_program, student_startup): ...@@ -44,7 +44,7 @@ with fluid.program_guard(student_program, student_startup):
```python ```python
teacher_model = models.__dict__['ResNet50']() model = slim.models.ResNet50()
teacher_program = fluid.Program() teacher_program = fluid.Program()
teacher_startup = fluid.Program() teacher_startup = fluid.Program()
with fluid.program_guard(teacher_program, teacher_startup): with fluid.program_guard(teacher_program, teacher_startup):
......
...@@ -16,4 +16,7 @@ from __future__ import absolute_import ...@@ -16,4 +16,7 @@ from __future__ import absolute_import
from .util import image_classification from .util import image_classification
from .slimfacenet import SlimFaceNet_A_x0_60, SlimFaceNet_B_x0_75, SlimFaceNet_C_x0_75 from .slimfacenet import SlimFaceNet_A_x0_60, SlimFaceNet_B_x0_75, SlimFaceNet_C_x0_75
from .slim_mobilenet import SlimMobileNet_v1, SlimMobileNet_v2, SlimMobileNet_v3, SlimMobileNet_v4, SlimMobileNet_v5 from .slim_mobilenet import SlimMobileNet_v1, SlimMobileNet_v2, SlimMobileNet_v3, SlimMobileNet_v4, SlimMobileNet_v5
__all__ = ["image_classification"] from .mobilenet import MobileNet
from .resnet import ResNet50
__all__ = ["image_classification", "MobileNet", "ResNet50"]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册