提交 66ec9da5 编写于 作者: L ling

conv1x1 bug

上级 98dc6eed
...@@ -86,3 +86,6 @@ test_temp_summary_event_file/ ...@@ -86,3 +86,6 @@ test_temp_summary_event_file/
mindspore/version.py mindspore/version.py
mindspore/default_config.py mindspore/default_config.py
mindspore/.commit_id mindspore/.commit_id
# lite test file
mindspore/lite/test/do_test/
...@@ -80,12 +80,12 @@ int Convolution1x1CPUKernel::InitConv1x1BiasWeight() { ...@@ -80,12 +80,12 @@ int Convolution1x1CPUKernel::InitConv1x1BiasWeight() {
bias_data_ = nullptr; 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) { if (weight_ptr_ == nullptr) {
MS_LOG(ERROR) << "Conv1x1 Malloc weight_ptr_ error!"; MS_LOG(ERROR) << "Conv1x1 Malloc weight_ptr_ error!";
return RET_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_, RowMajor2Col8Major(reinterpret_cast<float *>(inputs_[1]->Data()), weight_ptr_, matmul_param_->col_,
matmul_param_->deep_); matmul_param_->deep_);
return RET_OK; return RET_OK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册