未验证 提交 a4f4298d 编写于 作者: Y Yibing Liu 提交者: GitHub

Add pantheon import in all & Fix write error in py3 (#112)

上级 a7b93e04
...@@ -19,4 +19,5 @@ from paddleslim import nas ...@@ -19,4 +19,5 @@ from paddleslim import nas
from paddleslim import analysis from paddleslim import analysis
from paddleslim import dist from paddleslim import dist
from paddleslim import quant from paddleslim import quant
__all__ = ['models', 'prune', 'nas', 'analysis', 'dist', 'quant'] from paddleslim import pantheon
__all__ = ['models', 'prune', 'nas', 'analysis', 'dist', 'quant', 'pantheon']
...@@ -13,7 +13,7 @@ The illustration below shows an application of Pantheon, where the sudent model ...@@ -13,7 +13,7 @@ The illustration below shows an application of Pantheon, where the sudent model
## Prerequisites ## Prerequisites
- Python 2.7.x or 3.x - Python 2.7.x or 3.x
- PaddlePaddle >= 1.6.0 - PaddlePaddle >= 1.7.0
## APIs ## APIs
......
...@@ -158,7 +158,7 @@ class Student(object): ...@@ -158,7 +158,7 @@ class Student(object):
if end_recved: if end_recved:
break break
with open(in_path, 'r') as fin: with open(in_path, 'rb') as fin:
# get knowledge desc # get knowledge desc
desc = pickle.load(fin) desc = pickle.load(fin)
out_queue.put(desc) out_queue.put(desc)
......
...@@ -151,7 +151,7 @@ class Teacher(object): ...@@ -151,7 +151,7 @@ class Teacher(object):
self._t2s_queue = None self._t2s_queue = None
self._cmd_queue = None self._cmd_queue = None
self._out_file = open(self._out_path, "w") if self._out_path else None self._out_file = open(self._out_path, "wb") if self._out_path else None
if self._out_file: if self._out_file:
return return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册