Skip to content

Commit

Permalink
fix quick start (PaddlePaddle#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
baiyfbupt committed Jul 22, 2020
1 parent 115bbda commit 92b3e1c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/en/quick_start/distillation_tutorial_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```python
model = models.__dict__['MobileNet']()
model = slim.models.MobileNet()
student_program = fluid.Program()
student_startup = fluid.Program()
with fluid.program_guard(student_program, student_startup):
Expand All @@ -42,7 +42,7 @@ with fluid.program_guard(student_program, student_startup):


```python
teacher_model = models.__dict__['ResNet50']()
model = slim.models.ResNet50()
teacher_program = fluid.Program()
teacher_startup = fluid.Program()
with fluid.program_guard(teacher_program, teacher_startup):
Expand Down
4 changes: 2 additions & 2 deletions docs/zh_cn/quick_start/distillation_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import paddleslim as slim
选择`ResNet50`作为teacher对`MobileNet`结构的student进行蒸馏训练。

```python
model = models.__dict__['MobileNet']()
model = slim.models.MobileNet()
student_program = fluid.Program()
student_startup = fluid.Program()
with fluid.program_guard(student_program, student_startup):
Expand All @@ -44,7 +44,7 @@ with fluid.program_guard(student_program, student_startup):


```python
teacher_model = models.__dict__['ResNet50']()
model = slim.models.ResNet50()
teacher_program = fluid.Program()
teacher_startup = fluid.Program()
with fluid.program_guard(teacher_program, teacher_startup):
Expand Down
5 changes: 4 additions & 1 deletion paddleslim/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
from .util import image_classification
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
__all__ = ["image_classification"]
from .mobilenet import MobileNet
from .resnet import ResNet50

__all__ = ["image_classification", "MobileNet", "ResNet50"]

0 comments on commit 92b3e1c

Please sign in to comment.