提交 6225ad68 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!4827 [MS][LITE][BUG]set bias to zero

Merge pull request !4827 from fuzhiye/tmp
......@@ -68,6 +68,7 @@ int ConvolutionCPUKernel::InitWeightBias() {
MS_LOG(ERROR) << "malloc bias failed.";
return RET_ERROR;
}
memset(bias_data_, 0, oc_block_num * oc_block * sizeof(float));
if (in_tensors_.size() == kInputSize2) {
auto ori_bias = reinterpret_cast<float *>(in_tensors_.at(kBiasIndex)->Data());
......
......@@ -297,7 +297,7 @@ int ConvolutionInt8CPUKernel::ReSize() {
MS_LOG(ERROR) << "ConvolutionBase init failed.";
return RET_ERROR;
}
/*=============================nhwc4_input_============================*/
int ic4 = UP_DIV(conv_param_->input_channel_, C4NUM);
size_t nhwc4_input_size = ic4 * C4NUM * conv_param_->input_batch_ * conv_param_->input_h_ * conv_param_->input_w_;
nhwc4_input_ = malloc(nhwc4_input_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册