Skip to content

Commit

Permalink
fix install for paddle 1.6 (PaddlePaddle#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
slf12 authored Feb 21, 2020
1 parent d3a6932 commit 5e66198
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion paddleslim/quant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from .quanter import quant_aware, quant_post, convert
import logging

import paddle.fluid as fluid
from ..common import get_logger

_logger = get_logger(__name__, level=logging.INFO)

try:
fluid.require_version('1.7.0')
from .quanter import quant_aware, quant_post, convert
except Exception as e:
_logger.warning(
"If you want to use training-aware and post-training quantization, "
"please use Paddle >= 1.7.0 or develop version")

from .quant_embedding import quant_embedding

0 comments on commit 5e66198

Please sign in to comment.