diff --git a/mindspore/lite/tools/converter/quantizer/full_quant_quantizer.cc b/mindspore/lite/tools/converter/quantizer/full_quant_quantizer.cc index b8e0132332f..a20a321c16f 100644 --- a/mindspore/lite/tools/converter/quantizer/full_quant_quantizer.cc +++ b/mindspore/lite/tools/converter/quantizer/full_quant_quantizer.cc @@ -655,8 +655,12 @@ STATUS FullQuantQuantizer::DoParameterNodeQuant(const CNodePtr &cnode, const Anf MS_LOG(ERROR) << "Get data type failed."; return RET_ERROR; } + // support for share weight. + if (type_id == kNumberTypeInt8) { + return RET_CONTINUE; + } 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) { MS_LOG(ERROR) << "Set In/Out quant param failed."; return ret;