MCPcopy Create free account
hub / github.com/NVIDIA/DALI / TEST

Function TEST

dali/test/mat2tensor_test.cc:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27using kernels::tensor_shape;
28
29TEST(Mat2Tensor, Shape) {
30 cv::Mat mat;
31 mat.create(480, 640, CV_8UC3);
32 EXPECT_EQ(tensor_shape<3>(mat), TensorShape(480, 640, 3));
33 mat.create(123, 321, CV_32FC2);
34 EXPECT_EQ(tensor_shape<DynamicDimensions>(mat), TensorShape(123, 321, 2));
35 mat.create(123, 321, CV_32F);
36 EXPECT_EQ(tensor_shape<3>(mat), TensorShape(123, 321, 1));
37 EXPECT_EQ(tensor_shape<2>(mat), TensorShape(123, 321));
38}
39
40
41TEST(Mat2Tensor, View) {

Callers

nothing calls this directly

Calls 4

TensorShapeClass · 0.85
ImageListFunction · 0.85
CopyAsTensorGpuTestFunction · 0.85
createMethod · 0.45

Tested by

no test coverage detected