diff --git a/paddleslim/__init__.py b/paddleslim/__init__.py index c3607d1a49792563fe67aa4c1cb04e51489c23bf..357e1a293b4471eb6aca8c26c8ac852cae25f365 100644 --- a/paddleslim/__init__.py +++ b/paddleslim/__init__.py @@ -19,4 +19,5 @@ from paddleslim import nas from paddleslim import analysis from paddleslim import dist from paddleslim import quant -__all__ = ['models', 'prune', 'nas', 'analysis', 'dist', 'quant'] +from paddleslim import pantheon +__all__ = ['models', 'prune', 'nas', 'analysis', 'dist', 'quant', 'pantheon'] diff --git a/paddleslim/pantheon/README.md b/paddleslim/pantheon/README.md index a9f564dc73ccde44fdbde51179b8595dfc74c1f7..904b646f4b61136c7c175c396ca06c5c15bea5a5 100644 --- a/paddleslim/pantheon/README.md +++ b/paddleslim/pantheon/README.md @@ -13,7 +13,7 @@ The illustration below shows an application of Pantheon, where the sudent model ## Prerequisites - Python 2.7.x or 3.x -- PaddlePaddle >= 1.6.0 +- PaddlePaddle >= 1.7.0 ## APIs diff --git a/paddleslim/pantheon/student.py b/paddleslim/pantheon/student.py index 073e186585435a01f64761cf8445f19096e4ee0f..54b75ab20afa3008b849966993b6f5b07f2af343 100644 --- a/paddleslim/pantheon/student.py +++ b/paddleslim/pantheon/student.py @@ -158,7 +158,7 @@ class Student(object): if end_recved: break - with open(in_path, 'r') as fin: + with open(in_path, 'rb') as fin: # get knowledge desc desc = pickle.load(fin) out_queue.put(desc) diff --git a/paddleslim/pantheon/teacher.py b/paddleslim/pantheon/teacher.py index 6cd09efbbbc52ea90ca0d67fbb822e1f12a9c2a5..9a17f6c788790a82e1a865817144769dcb1cfb4f 100644 --- a/paddleslim/pantheon/teacher.py +++ b/paddleslim/pantheon/teacher.py @@ -151,7 +151,7 @@ class Teacher(object): self._t2s_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: return