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

Exclude concat layer for gpu quantization #14060

Merged
merged 3 commits into from
Feb 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions example/quantization/imagenet_gen_qsym.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ def save_params(fname, arg_params, aux_params, logger=None):
if args.ctx == 'gpu':
calib_layer = lambda name: name.endswith('_output') and (name.find('conv') != -1
or name.find('fc') != -1)
excluded_sym_names += ['ch_concat_3a_chconcat',
'ch_concat_3b_chconcat',
'ch_concat_3c_chconcat',
'ch_concat_4a_chconcat',
'ch_concat_4b_chconcat',
'ch_concat_4c_chconcat',
'ch_concat_4d_chconcat',
'ch_concat_4e_chconcat',
'ch_concat_5a_chconcat',
'ch_concat_5b_chconcat']
else:
calib_layer = lambda name: name.endswith('_output') and (name.find('conv') != -1)
excluded_sym_names += ['flatten', 'fc1']
Expand Down
3 changes: 2 additions & 1 deletion tests/python/quantization/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ def check_qsym_forward(qsym, qarg_params, qaux_params, data_shape, label_shape):
excluded_names = []
if mx.current_context() == mx.cpu():
excluded_names += ['fc']
excluded_names += ['concat']
else:
excluded_names += ['concat']

optional_names = ['pool0']
for skip_optional_names in [False, True]:
Expand Down