Commit 7b8fb64f authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #9939 from alalek:fix_dnn_getUMat_crash

parents 0c291c77 436a1f72
...@@ -692,8 +692,11 @@ void TFImporter::populateNet(Net dstNet) ...@@ -692,8 +692,11 @@ void TFImporter::populateNet(Net dstNet)
int dst_i = (j * chMultiplier + i) * height* width + s; int dst_i = (j * chMultiplier + i) * height* width + s;
dst[dst_i] = src[src_i]; dst[dst_i] = src[src_i];
} }
// TODO Use reshape instead
kshape[0] = inCh * chMultiplier; kshape[0] = inCh * chMultiplier;
kshape[1] = 1; kshape[1] = 1;
size_t* kstep = layerParams.blobs[0].step.p;
kstep[0] = kstep[1]; // fix steps too
} }
layerParams.set("kernel_h", kshape[2]); layerParams.set("kernel_h", kshape[2]);
layerParams.set("kernel_w", kshape[3]); layerParams.set("kernel_w", kshape[3]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment