未验证 提交 a9537ca4 编写于 作者: R Ruilong Liu 提交者: GitHub

Merge pull request #699 from codeWorm2015/develop

fix #672
...@@ -32,7 +32,12 @@ void ConvAddBasic(const FusionConvAddParam &param) { ...@@ -32,7 +32,12 @@ void ConvAddBasic(const FusionConvAddParam &param) {
int axis = param.Axis(); int axis = param.Axis();
Tensor *output = param.Output(); Tensor *output = param.Output();
math::expand_bias(bias, axis, output->dims()); math::expand_bias(bias, axis, output->dims());
output->ShareDataWith(bias); float *output_data = output->data<float>();
float *biase_data = bias.data<float>();
for (int k = 0; k < output->numel(); ++k) {
output_data[k] = biase_data[k];
}
int groups = param.Groups(); int groups = param.Groups();
std::vector<int> strides = param.Strides(); std::vector<int> strides = param.Strides();
std::vector<int> paddings = param.Paddings(); std::vector<int> paddings = param.Paddings();
......
...@@ -29,7 +29,12 @@ void ConvAddReluCompute(const FusionConvAddReluParam &param) { ...@@ -29,7 +29,12 @@ void ConvAddReluCompute(const FusionConvAddReluParam &param) {
int axis = param.Axis(); int axis = param.Axis();
Tensor *output = param.Output(); Tensor *output = param.Output();
math::expand_bias(bias, axis, output->dims()); math::expand_bias(bias, axis, output->dims());
output->ShareDataWith(bias); float *output_data = output->data<float>();
float *biase_data = bias.data<float>();
for (int k = 0; k < output->numel(); ++k) {
output_data[k] = biase_data[k];
}
int groups = param.Groups(); int groups = param.Groups();
std::vector<int> strides = param.Strides(); std::vector<int> strides = param.Strides();
std::vector<int> paddings = param.Paddings(); std::vector<int> paddings = param.Paddings();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册