Skip to content
Snippets Groups Projects

[Add] Resize Operator unit-tests

Closed Michal Szczepanski requested to merge mszczep/aidge_core:operator_resize into dev
All threads resolved!
1 file
+ 16
8
Compare changes
  • Side-by-side
  • Inline
@@ -61,17 +61,25 @@ TEST_CASE("[core/operator] Resize_Op(forwardDims)", "[Resize][forwardDimsScales]
}
SECTION("Connected and fixed Input and Scales") {
test_resize(op, {1,1,2,2}, {1, 1, 2, 2}, {1,1,4,4}, true);
test_resize(op, {4,4,10,10}, {1, 1, 2, 3}, {4, 4, 20, 30}, true);
test_resize(op, {4,2,10,10}, {1, 1, 0.5, 0.5}, {4, 2, 5, 5}, true);
test_resize(op, {11, 11, 4, 4}, {1, 1, 0.3, 0.3}, {11, 11, 1, 1}, true);
test_resize(op, std::vector<long unsigned int>({1, 1, 2, 2}),\
std::vector<float>({1, 1, 2, 2}), std::vector<long unsigned int>({1,1,4,4}), true);
test_resize(op, std::vector<long unsigned int>({4, 4, 10, 10}),\
std::vector<float>({1, 1, 2, 3}), std::vector<long unsigned int>({4, 4, 20, 30}), true);
test_resize(op, std::vector<long unsigned int>({4, 2, 10, 10}),\
std::vector<float>({1, 1, 0.5, 0.5}), std::vector<long unsigned int>({4, 2, 5, 5}), true);
test_resize(op, std::vector<long unsigned int>({11, 11, 4, 4}),\
std::vector<float>({1, 1, 0.3, 0.3}), std::vector<long unsigned int>({11, 11, 1, 1}), true);
}
SECTION("Connected and fixed Input and Sizes") {
test_resize(op, {1,1,2,2}, {1, 1, 8, 8}, {1,1,8,8}, false);
test_resize(op, {60,60,30,30}, {1, 1, 75, 75}, {60,60,75,75}, false);
test_resize(op, {11,11,20,20}, {1, 1, 8, 8}, {11,11,8,8}, false);
test_resize(op, {43,211,22,22}, {1, 1, 10, 10}, {43,211,10,10}, false);
test_resize(op, std::vector<long unsigned int>({1,1,2,2}),\
std::vector<float>({1, 1, 8, 8}), std::vector<long unsigned int>({1,1,8,8}), false);
test_resize(op, std::vector<long unsigned int>({60,60,30,30}),\
std::vector<float>({1, 1, 75, 75}), std::vector<long unsigned int>({60,60,75,75}), false);
test_resize(op, std::vector<long unsigned int>({11,11,20,20}),\
std::vector<float>({1, 1, 8, 8}), std::vector<long unsigned int>({11,11,8,8}), false);
test_resize(op, std::vector<long unsigned int>({43,211,22,22}),\
std::vector<float>({1, 1, 10, 10}), std::vector<long unsigned int>({43,211,10,10}), false);
}
}
Loading