|
|
|
@@ -251,6 +251,7 @@ STATUS OnnxModelParser::ParseOnnxGivenFillNode(const onnx::NodeProto &onnx_node) |
|
|
|
quant_param->zeroPoint = static_cast<int32_t>(onnx_node_attr.i()); |
|
|
|
} |
|
|
|
} |
|
|
|
quant_param->inited = true; |
|
|
|
tensor->quantParams.emplace_back(std::move(quant_param)); |
|
|
|
} else { |
|
|
|
MS_LOG(ERROR) << "unsupported data type " << tensor->dataType; |
|
|
|
@@ -369,6 +370,7 @@ void OnnxModelParser::SetOpQuantParams(const onnx::GraphProto &onnx_graph, const |
|
|
|
MS_LOG(ERROR) << "new QuantParamT failed, node: " << dst_op->name; |
|
|
|
return; |
|
|
|
} |
|
|
|
quant_param->inited = true; |
|
|
|
int argNum = 0; |
|
|
|
for (const auto &onnx_node_attr : node.attribute()) { |
|
|
|
if (onnx_node_attr.name() == "Y_scale") { |
|
|
|
@@ -384,6 +386,7 @@ void OnnxModelParser::SetOpQuantParams(const onnx::GraphProto &onnx_graph, const |
|
|
|
quant_param->zeroPoint = 0; |
|
|
|
quant_param->min = FLT_MAX; |
|
|
|
quant_param->max = FLT_MAX; |
|
|
|
quant_param->inited = false; |
|
|
|
} |
|
|
|
dst_tensor->quantParams.emplace_back(std::move(quant_param)); |
|
|
|
if (argNum == 2) { |
|
|
|
|