forked from mindspore-Ecosystem/mindspore
!24415 Fix non-fp32 quantization problem
Merge pull request !24415 from yeyunpeng2020/master
This commit is contained in:
commit
56ef451d43
|
@ -655,8 +655,12 @@ STATUS FullQuantQuantizer::DoParameterNodeQuant(const CNodePtr &cnode, const Anf
|
||||||
MS_LOG(ERROR) << "Get data type failed.";
|
MS_LOG(ERROR) << "Get data type failed.";
|
||||||
return RET_ERROR;
|
return RET_ERROR;
|
||||||
}
|
}
|
||||||
|
// support for share weight.
|
||||||
|
if (type_id == kNumberTypeInt8) {
|
||||||
|
return RET_CONTINUE;
|
||||||
|
}
|
||||||
if (type_id != kNumberTypeFloat32) {
|
if (type_id != kNumberTypeFloat32) {
|
||||||
ret = SetInOutQuantParam(input_node, nullptr, primitive, true, input_index);
|
ret = SetInOutQuantParam(input_node, nullptr, primitive, true, input_index - 1);
|
||||||
if (ret != RET_OK) {
|
if (ret != RET_OK) {
|
||||||
MS_LOG(ERROR) << "Set In/Out quant param failed.";
|
MS_LOG(ERROR) << "Set In/Out quant param failed.";
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue