Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–306 unchanged (306 lines)
307 l1 = 1e-3;
308 lInf = 1e-3;
309 }
310
311 normAssert(ref, out, "", l1, lInf);
312}
313
314INSTANTIATE_TEST_CASE_P(/**/, Test_TFLite, dnnBackendsAndTargets());
315
316}} // namespace
317
318#endif // OPENCV_TEST_DNN_TFLITE
319

After

…lines 1–307 unchanged (307 lines)
308 lInf = 1e-3;
309 }
310
311 normAssert(ref, out, "", l1, lInf);
312}
313
314TEST_P(Test_TFLite, minimum)
315{
316 Net net = readNetFromTFLite(findDataFile("dnn/tflite/minimum.tflite"));
317
318 net.setPreferableBackend(backend);
319 net.setPreferableTarget(target);
320
321 Mat input_x = blobFromNPY(findDataFile("dnn/tflite/minimum_input_x.npy"));
322 Mat input_y = blobFromNPY(findDataFile("dnn/tflite/minimum_input_y.npy"));
323
324 net.setInput(input_x, "x");
325 net.setInput(input_y, "y");
326
327 Mat out = net.forward();
328 Mat ref = blobFromNPY(findDataFile("dnn/tflite/minimum_output.npy"));
329
330 double l1 = 1e-5;
331 double lInf = 1e-4;
332
333 if (target == DNN_TARGET_CUDA_FP16 || target == DNN_TARGET_OPENCL_FP16)
334 {
335 l1 = 1e-3;
336 lInf = 1e-3;
337 }
338
339 normAssert(ref, out, "", l1, lInf);
340}
341
342INSTANTIATE_TEST_CASE_P(/**/, Test_TFLite, dnnBackendsAndTargets());
343
344}} // namespace
345
346#endif // OPENCV_TEST_DNN_TFLITE
347

Before

translation_unit
comment "// This file is part of OpenCV project."
comment "// It is subject to the license terms in the LICENSE file fo"...
comment "// of this distribution and at http://opencv.org/license.htm"...
comment "/*\nTest for TFLite models loading\n*/"
preproc_include
#include "#include"
string_literal
" "\""
string_content "test_precomp.hpp"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "npy_blob.hpp"
" "\""
preproc_include
#include "#include"
system_lib_string "<opencv2/dnn/layer.details.hpp>"
comment "// CV_DNN_REGISTER_LAYER_CLASS"
preproc_include
#include "#include"
system_lib_string "<opencv2/dnn/utils/debug_utils.hpp>"
preproc_include
#include "#include"
system_lib_string "<opencv2/dnn/shape_utils.hpp>"
preproc_ifdef
#ifdef "#ifdef"
identifier "OPENCV_TEST_DNN_TFLITE"
namespace_definition
namespace "namespace"
namespace_identifier "opencv_test"
declaration_list
{ "{"
namespace_definition
namespace "namespace"
declaration_list
{ "{"
using_declaration
using "using"
namespace "namespace"
identifier "cv"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "cv"
:: "::"
identifier "dnn"
; ";"
class_specifier (+164 nodes collapsed)
; ";"
function_definition (+159 nodes collapsed)
function_definition (+411 nodes collapsed)
function_definition (+86 nodes collapsed)
function_definition (+95 nodes collapsed)
function_definition (+105 nodes collapsed)
comment "// https://google.github.io/mediapipe/solutions/face_mesh"
function_definition (+130 nodes collapsed)
comment "// https://google.github.io/mediapipe/solutions/face_detecti"...
function_definition (+107 nodes collapsed)
comment "// https://google.github.io/mediapipe/solutions/selfie_segme"...
function_definition (+107 nodes collapsed)
function_definition (+1046 nodes collapsed)
function_definition (+256 nodes collapsed)
function_definition (+71 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+42 nodes collapsed)
function_definition (+60 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+47 nodes collapsed)
function_definition (+224 nodes collapsed)
expression_statement
call_expression
identifier "INSTANTIATE_TEST_CASE_P"
argument_list
( "("
comment "/**/"
ERROR
, ","
identifier "Test_TFLite"
, ","
call_expression
identifier "dnnBackendsAndTargets"
argument_list
( "("
) ")"
) ")"
; ";"
} "}"
} "}"
comment "// namespace"
#endif "#endif"
comment "// OPENCV_TEST_DNN_TFLITE"

After

translation_unit
comment "// This file is part of OpenCV project."
comment "// It is subject to the license terms in the LICENSE file fo"...
comment "// of this distribution and at http://opencv.org/license.htm"...
comment "/*\nTest for TFLite models loading\n*/"
preproc_include
#include "#include"
string_literal
" "\""
string_content "test_precomp.hpp"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "npy_blob.hpp"
" "\""
preproc_include
#include "#include"
system_lib_string "<opencv2/dnn/layer.details.hpp>"
comment "// CV_DNN_REGISTER_LAYER_CLASS"
preproc_include
#include "#include"
system_lib_string "<opencv2/dnn/utils/debug_utils.hpp>"
preproc_include
#include "#include"
system_lib_string "<opencv2/dnn/shape_utils.hpp>"
preproc_ifdef
#ifdef "#ifdef"
identifier "OPENCV_TEST_DNN_TFLITE"
namespace_definition
namespace "namespace"
namespace_identifier "opencv_test"
declaration_list
{ "{"
namespace_definition
namespace "namespace"
declaration_list
{ "{"
using_declaration
using "using"
namespace "namespace"
identifier "cv"
; ";"
using_declaration
using "using"
namespace "namespace"
qualified_identifier
namespace_identifier "cv"
:: "::"
identifier "dnn"
; ";"
class_specifier (+164 nodes collapsed)
; ";"
function_definition (+159 nodes collapsed)
function_definition (+411 nodes collapsed)
function_definition (+86 nodes collapsed)
function_definition (+95 nodes collapsed)
function_definition (+105 nodes collapsed)
comment "// https://google.github.io/mediapipe/solutions/face_mesh"
function_definition (+130 nodes collapsed)
comment "// https://google.github.io/mediapipe/solutions/face_detecti"...
function_definition (+107 nodes collapsed)
comment "// https://google.github.io/mediapipe/solutions/selfie_segme"...
function_definition (+107 nodes collapsed)
function_definition (+1046 nodes collapsed)
function_definition (+256 nodes collapsed)
function_definition (+71 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+42 nodes collapsed)
function_definition (+60 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+25 nodes collapsed)
function_definition (+47 nodes collapsed)
function_definition (+224 nodes collapsed)
function_definition
function_declarator
identifier "TEST_P"
parameter_list
( "("
parameter_declaration
type_identifier "Test_TFLite"
, ","
parameter_declaration
type_identifier "minimum"
) ")"
compound_statement
{ "{"
declaration
type_identifier "Net"
init_declarator
identifier "net"
= "="
call_expression
identifier "readNetFromTFLite"
argument_list
( "("
call_expression
identifier "findDataFile"
argument_list
( "("
string_literal
" "\""
string_content "dnn/tflite/minimum.tflite"
" "\""
) ")"
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "net"
. "."
field_identifier "setPreferableBackend"
argument_list
( "("
identifier "backend"
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "net"
. "."
field_identifier "setPreferableTarget"
argument_list
( "("
identifier "target"
) ")"
; ";"
declaration
type_identifier "Mat"
init_declarator
identifier "input_x"
= "="
call_expression
identifier "blobFromNPY"
argument_list
( "("
call_expression
identifier "findDataFile"
argument_list
( "("
string_literal
" "\""
string_content "dnn/tflite/minimum_input_x.npy"
" "\""
) ")"
) ")"
; ";"
declaration
type_identifier "Mat"
init_declarator
identifier "input_y"
= "="
call_expression
identifier "blobFromNPY"
argument_list
( "("
call_expression
identifier "findDataFile"
argument_list
( "("
string_literal
" "\""
string_content "dnn/tflite/minimum_input_y.npy"
" "\""
) ")"
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "net"
. "."
field_identifier "setInput"
argument_list
( "("
identifier "input_x"
, ","
string_literal
" "\""
string_content "x"
" "\""
) ")"
; ";"
expression_statement
call_expression
field_expression
identifier "net"
. "."
field_identifier "setInput"
argument_list
( "("
identifier "input_y"
, ","
string_literal
" "\""
string_content "y"
" "\""
) ")"
; ";"
declaration
type_identifier "Mat"
init_declarator
identifier "out"
= "="
call_expression
field_expression
identifier "net"
. "."
field_identifier "forward"
argument_list
( "("
) ")"
; ";"
declaration
type_identifier "Mat"
init_declarator
identifier "ref"
= "="
call_expression
identifier "blobFromNPY"
argument_list
( "("
call_expression
identifier "findDataFile"
argument_list
( "("
string_literal
" "\""
string_content "dnn/tflite/minimum_output.npy"
" "\""
) ")"
) ")"
; ";"
declaration
primitive_type "double"
init_declarator
identifier "l1"
= "="
number_literal "1e-5"
; ";"
declaration
primitive_type "double"
init_declarator
identifier "lInf"
= "="
number_literal "1e-4"
; ";"
if_statement
if "if"
condition_clause
( "("
binary_expression
binary_expression
identifier "target"
== "=="
identifier "DNN_TARGET_CUDA_FP16"
|| "||"
binary_expression
identifier "target"
== "=="
identifier "DNN_TARGET_OPENCL_FP16"
) ")"
compound_statement
{ "{"
expression_statement
assignment_expression
identifier "l1"
= "="
number_literal "1e-3"
; ";"
expression_statement
assignment_expression
identifier "lInf"
= "="
number_literal "1e-3"
; ";"
} "}"
expression_statement
call_expression
identifier "normAssert"
argument_list
( "("
identifier "ref"
, ","
identifier "out"
, ","
string_literal
" "\""
" "\""
, ","
identifier "l1"
, ","
identifier "lInf"
) ")"
; ";"
} "}"
expression_statement
call_expression
identifier "INSTANTIATE_TEST_CASE_P"
argument_list
( "("
comment "/**/"
ERROR
, ","
identifier "Test_TFLite"
, ","
call_expression
identifier "dnnBackendsAndTargets"
argument_list
( "("
) ")"
) ")"
; ";"
} "}"
} "}"
comment "// namespace"
#endif "#endif"
comment "// OPENCV_TEST_DNN_TFLITE"