-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
@@ -216,7 +216,7 @@ def save_params(fname, arg_params, aux_params, logger=None): | |||
if exclude_first_conv: | |||
excluded_sym_names += ['resnetv10_conv0_fwd'] | |||
elif args.model.find('resnet') != -1 and args.model.find('v2') != -1: | |||
excluded_sym_names += ['resnetv20_flatten0_flatten0'] | |||
excluded_sym_names += ['resnetv20_flatten0_flatten0', 'resnetv20_stage1_batchnorm0_fwd'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why exclude the first one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the sake of accuracy, if do not exclude this layer, top-1 accuracy will drop to 52.3. Reason of this accuracy drop is under investigation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just add a comment to remind that the excluded BN layer is for accuracy purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
LGTM and mering now.
Description
add uint8 batchnorm, mkldnn implementation and test
@PatricZhao @ZhennanQin
Details
Usage
Check the doc in https://github.com/apache/incubator-mxnet/tree/master/example/quantization/README.md to quantize models and do inference.
Quantized bn will be used automatically when a bn operator cannot be fused.
Performance
In most cases, bn can be fused, so quantized bn is not introduced. In reset50 v2, some of the bn operators are standalone, quantizing these bn give a performance as follows: