Browse Source

!3890 conv1x1 bug

Merge pull request !3890 from ling/conv1x1
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
942060d7d6
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      .gitignore
  2. +2
    -2
      mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc

+ 3
- 0
.gitignore View File

@@ -86,3 +86,6 @@ test_temp_summary_event_file/
mindspore/version.py
mindspore/default_config.py
mindspore/.commit_id

# lite test file
mindspore/lite/test/do_test/

+ 2
- 2
mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc View File

@@ -80,12 +80,12 @@ int Convolution1x1CPUKernel::InitConv1x1BiasWeight() {
bias_data_ = nullptr;
}

weight_ptr_ = reinterpret_cast<float *>(malloc(matmul_param_->row_8_ * matmul_param_->col_8_ * sizeof(float)));
weight_ptr_ = reinterpret_cast<float *>(malloc(matmul_param_->deep_ * matmul_param_->col_8_ * sizeof(float)));
if (weight_ptr_ == nullptr) {
MS_LOG(ERROR) << "Conv1x1 Malloc weight_ptr_ error!";
return RET_ERROR;
}
memset(weight_ptr_, 0, matmul_param_->row_8_ * matmul_param_->col_8_ * sizeof(float));
memset(weight_ptr_, 0, matmul_param_->deep_ * matmul_param_->col_8_ * sizeof(float));
RowMajor2Col8Major(reinterpret_cast<float *>(inputs_[1]->Data()), weight_ptr_, matmul_param_->col_,
matmul_param_->deep_);
return RET_OK;


Loading…
Cancel
Save