-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
Thank you for the quick fix @ciyongch . Do you mind pasting the error log here? |
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.
small changes
example/ssd/quantization.py
Outdated
@@ -128,6 +127,8 @@ def save_params(fname, arg_params, aux_params, logger=None): | |||
if exclude_first_conv: | |||
excluded_sym_names += ['conv1_1'] | |||
|
|||
excluded_sym_names += ['multibox_loc_pred', 'concat0', 'concat1'] |
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.
add to line124
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.
done :)
Would you mind also help me fix a typo in ssd readme?
|
@TaoLv, error log is as below:
|
no problem @xinyu-intel |
Thanks:) |
label_names=(label_name,), | ||
calib_quantize_op = True, | ||
calib_quantize_op=True, | ||
logger=logger) | ||
sym_name = '%s-symbol.json' % ('./model/cqssd_vgg16_reduced_300') | ||
param_name = '%s-%04d.params' % ('./model/cqssd_vgg16_reduced_300', epoch) |
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 not remove 0000 in here instead of adding 0000 in the readme? Any special meaning for it?
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.
It's a convention of mxnet. We can save different parameter files at different epochs.
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 explanation. Agree the change makes sense :)
example/quantization/README.md
Outdated
@@ -218,7 +218,7 @@ data/ | |||
|---val.lxt | |||
|---val.idx | |||
model/ | |||
|---ssd_vgg16_reduced_300.params | |||
|---ssd_vgg16_reduced_300-0000.params |
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.
please add the note, user needs to rename, such as ssd-val-fc19a535.idx to val.idx.
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.
Another suggestion is to move/copy the SSD quantization instruction into ssd/README too.
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
@reminisce @ZhennanQin Please take a look. |
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 for a hotfix.
Regarding other parts of changes I mentioned, I think it can be left to another PR.
@pengzhao-intel Good suggestion to update the readme as you mentioned above, no problem to me to update the change in this PR:) |
@TaoLv @reminisce This PR is only a fix to SSD quantization script in example and the update to README, please help to merge if no other comments :) |
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.
Minor comments.
example/quantization/README.md
Outdated
@@ -34,7 +34,7 @@ The following models have been tested on Linux systems. | |||
|[Inception V3](#7)|[Gluon-CV](https://gluon-cv.mxnet.io/model_zoo/classification.html)|[Validation Dataset](http://data.mxnet.io/data/val_256_q90.rec)|76.49%/93.10% |76.38%/93% | | |||
|[ResNet152-V2](#8)|[MXNet ModelZoo](http://data.mxnet.io/models/imagenet/resnet/152-layers/)|[Validation Dataset](http://data.mxnet.io/data/val_256_q90.rec)|76.76%/93.03%|76.48%/92.96%| | |||
|[Inception-BN](#9)|[MXNet ModelZoo](http://data.mxnet.io/models/imagenet/inception-bn/)|[Validation Dataset](http://data.mxnet.io/data/val_256_q90.rec)|72.09%/90.60%|72.00%/90.53%| | |||
| [SSD-VGG](#10) | [example/ssd](/~https://github.com/apache/incubator-mxnet/tree/master/example/ssd) | VOC2007/2012 | 0.83 mAP | 0.82 mAP | | |||
| [SSD-VGG](#10) | [example/ssd](/~https://github.com/apache/incubator-mxnet/tree/master/example/ssd) | VOC2007/2012 | 0.8366 mAP | 0.8364 mAP | |
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.
SSD-VGG16
example/quantization/README.md
Outdated
@@ -210,40 +210,7 @@ python imagenet_inference.py --symbol-file=./model/imagenet1k-inception-bn-quant | |||
|
|||
<h3 id='10'>SSD-VGG</h3> |
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.
SSD-VGG16
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.
no problem, any other description in current README need udpated?
Thank you for the fix @ciyongch. Merging it now. |
* fix ssd quantization script error * update readme for ssd * move quantized SSD instructions from quantization/README.md to ssd/README.md * update ssd readme and accuracy * update readme for SSD-vGG16
@lifu-wang You may be interested. We will have nightly build with this fix soon. |
* fix ssd quantization script error * update readme for ssd * move quantized SSD instructions from quantization/README.md to ssd/README.md * update ssd readme and accuracy * update readme for SSD-vGG16
* fix ssd quantization script error * update readme for ssd * move quantized SSD instructions from quantization/README.md to ssd/README.md * update ssd readme and accuracy * update readme for SSD-vGG16
* fix ssd quantization script error * update readme for ssd * move quantized SSD instructions from quantization/README.md to ssd/README.md * update ssd readme and accuracy * update readme for SSD-vGG16
Description
This PR is to address an error of "symbol not found" during ssd quantization process.
Since there're some Op outputs are not in the format of
{opname}_output
, which results in no calibrated min/max for such variables in quantized param file, and cause the error.Leave the
calib_layer
to None (which is default) is a safety way to do the calibration.@pengzhao-intel @TaoLv @ZhennanQin @xinyu-intel @apeforest
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments