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:
@@ -97,7 +97,7 @@ TEST(Test_Darknet, read_yolo_voc_stream)
|
||||
class Test_Darknet_layers : public DNNTestLayer
|
||||
{
|
||||
public:
|
||||
void testDarknetLayer(const std::string& name, bool hasWeights = false)
|
||||
void testDarknetLayer(const std::string& name, bool hasWeights = false, bool testBatchProcessing = true)
|
||||
{
|
||||
SCOPED_TRACE(name);
|
||||
Mat inp = blobFromNPY(findDataFile("dnn/darknet/" + name + "_in.npy"));
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
Mat out = net.forward();
|
||||
normAssert(out, ref, "", default_l1, default_lInf);
|
||||
|
||||
if (inp.size[0] == 1) // test handling of batch size
|
||||
if (inp.size[0] == 1 && testBatchProcessing) // test handling of batch size
|
||||
{
|
||||
SCOPED_TRACE("batch size 2");
|
||||
|
||||
@@ -578,6 +578,12 @@ TEST_P(Test_Darknet_layers, convolutional)
|
||||
testDarknetLayer("convolutional", true);
|
||||
}
|
||||
|
||||
TEST_P(Test_Darknet_layers, scale_channels)
|
||||
{
|
||||
// TODO: test fails for batches due to a bug/missing feature in ScaleLayer
|
||||
testDarknetLayer("scale_channels", false, false);
|
||||
}
|
||||
|
||||
TEST_P(Test_Darknet_layers, connected)
|
||||
{
|
||||
if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16)
|
||||
|
||||
Reference in New Issue
Block a user