mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 12:22:51 +08:00
Merge pull request #20647 from rogday:resize_concat_optimization
Fix resize+concat optimization * fix resize+concat optimization * add comment and fix indentation
This commit is contained in:
parent
7c23ec90a9
commit
d0e612dc36
@ -111,7 +111,14 @@ public:
|
|||||||
internals_arr.getMatVector(internals);
|
internals_arr.getMatVector(internals);
|
||||||
|
|
||||||
if (outHeight == inputs[0].size[2] && outWidth == inputs[0].size[3])
|
if (outHeight == inputs[0].size[2] && outWidth == inputs[0].size[3])
|
||||||
|
{
|
||||||
|
// outputs[0] = inputs[0] doesn't work due to BlobManager optimizations
|
||||||
|
if (inputs[0].data != outputs[0].data)
|
||||||
|
{
|
||||||
|
inputs[0].copyTo(outputs[0]);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Mat& inp = inputs[0];
|
Mat& inp = inputs[0];
|
||||||
Mat& out = outputs[0];
|
Mat& out = outputs[0];
|
||||||
|
@ -1125,6 +1125,11 @@ TEST_P(Test_TensorFlow_layers, resize_bilinear_down)
|
|||||||
runTensorFlowNet("resize_bilinear_down");
|
runTensorFlowNet("resize_bilinear_down");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_P(Test_TensorFlow_layers, resize_concat_optimization)
|
||||||
|
{
|
||||||
|
runTensorFlowNet("resize_concat_optimization");
|
||||||
|
}
|
||||||
|
|
||||||
TEST_P(Test_TensorFlow_layers, tf2_dense)
|
TEST_P(Test_TensorFlow_layers, tf2_dense)
|
||||||
{
|
{
|
||||||
runTensorFlowNet("tf2_dense");
|
runTensorFlowNet("tf2_dense");
|
||||||
|
Loading…
Reference in New Issue
Block a user