Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix py27 quantization (#17153)
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyu-intel authored and pengzhao-intel committed Dec 27, 2019
1 parent 8a14a6a commit 4fda46b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/mxnet/contrib/quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,9 @@ def quantize_model_mkldnn(sym, arg_params, aux_params,
A tuple of quantized symbol, quantized arg_params, and aux_params.
-------
"""
if ctx != cpu():
if not isinstance(ctx, Context):
raise ValueError('currently only supports single ctx, while received %s' % str(ctx))
if ctx.device_type != 'cpu':
raise ValueError(
'quantize_model_mkldnn only support Intel cpu platform with MKL-DNN Backend')

Expand Down

0 comments on commit 4fda46b

Please sign in to comment.