提交 4f0e907c 编写于 作者: Y yangfei

repair bug of predict ten times' diffent result in genet

上级 17c5c289
...@@ -96,6 +96,10 @@ void ConvTransposeCompute(const ConvTransposeParam<CPU> &param) { ...@@ -96,6 +96,10 @@ void ConvTransposeCompute(const ConvTransposeParam<CPU> &param) {
math::matmul(filter_slice, true, in_slice, false, static_cast<P>(1.0), math::matmul(filter_slice, true, in_slice, false, static_cast<P>(1.0),
&col_matrix, static_cast<P>(0.0)); &col_matrix, static_cast<P>(0.0));
//初始化out_slice的值为0
float *tmp = out_slice.data<float>();
int numel = out_slice.numel();
memset(static_cast<void *>(tmp), 0, sizeof(float) * numel);
if (data_dim == 2U) { if (data_dim == 2U) {
col2im(col, dilations, strides, col2im(col, dilations, strides,
std::vector<int>{paddings[0], paddings[1], paddings[0], std::vector<int>{paddings[0], paddings[1], paddings[0],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册