mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -33,6 +33,7 @@ public:
|
||||
|
||||
|
||||
BatchNormLayerImpl(const LayerParams& params)
|
||||
: dims(-1)
|
||||
{
|
||||
setParamsFrom(params);
|
||||
CV_Assert(blobs.size() >= 2);
|
||||
|
||||
@@ -147,6 +147,7 @@ public:
|
||||
UMat &inpMat = inputs[inpIdx];
|
||||
UMat &outMat = outputs[inpIdx];
|
||||
int newRows = total(shape(inpMat), 0, splitDim);
|
||||
CV_Assert(newRows != 0);
|
||||
|
||||
MatShape s = shape(newRows, inpMat.total() / newRows);
|
||||
UMat meanMat = UMat(s[0], 1, (use_half) ? CV_16S : CV_32F);
|
||||
@@ -221,6 +222,7 @@ public:
|
||||
UMat &inpMat = inputs[inpIdx];
|
||||
UMat &outMat = outputs[inpIdx];
|
||||
int newRows = total(shape(inpMat), 0, splitDim);
|
||||
CV_Assert(newRows != 0);
|
||||
|
||||
MatShape s = shape(newRows, inpMat.total() / newRows);
|
||||
UMat oneMat = UMat::ones(s[1], 1, CV_32F);
|
||||
|
||||
@@ -138,6 +138,7 @@ static void computeShapeByReshapeMask(const MatShape &srcShape,
|
||||
|
||||
size_t srcTotal = total(srcShape);
|
||||
size_t dstTotal = total(dstShape);
|
||||
CV_Assert(dstTotal != 0);
|
||||
|
||||
if (inferDim != -1)
|
||||
{
|
||||
|
||||
@@ -162,6 +162,8 @@ void runLayer(LayerParams& params, const std::vector<Mat>& inputs,
|
||||
std::vector<Mat>& outputs)
|
||||
{
|
||||
Ptr<Layer> layer = LayerFactory::createLayerInstance(params.type, params);
|
||||
CV_Assert((bool)layer);
|
||||
|
||||
std::vector<MatShape> inpShapes(inputs.size());
|
||||
int ddepth = CV_32F;
|
||||
for (size_t i = 0; i < inputs.size(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user