mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 19:50:38 +08:00
Output blobs shapes initialization in case of identity permutation (NCHW->NCHW)
This commit is contained in:
parent
110af09bf9
commit
a3a446c197
@ -117,7 +117,10 @@ public:
|
||||
std::vector<MatShape> &internals) const
|
||||
{
|
||||
if(!_needsPermute)
|
||||
{
|
||||
Layer::getMemoryShapes(inputs, requiredOutputs, outputs, internals);
|
||||
return true;
|
||||
}
|
||||
|
||||
CV_Assert(inputs.size() > 0);
|
||||
CV_Assert((int)_numAxes == inputs[0].size());
|
||||
@ -253,7 +256,11 @@ public:
|
||||
if(!_needsPermute)
|
||||
{
|
||||
for (k = 0; k < ninputs; k++)
|
||||
outputs[k] = *inputs[k];
|
||||
{
|
||||
CV_Assert(outputs[k].total() == inputs[k]->total());
|
||||
if (outputs[k].data != inputs[k]->data)
|
||||
inputs[k]->copyTo(outputs[k]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user