From: 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Thu, 25 Jul 2019 01:17:36 +0000 (+0900) Subject: [moco-tf] Fix test of fix shape and pad transform (#5848) X-Git-Tag: submit/tizen/20190809.050447~426 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a4958c57111a0e624bca592260ab2f8c877ada1;p=platform%2Fcore%2Fml%2Fnnfw.git [moco-tf] Fix test of fix shape and pad transform (#5848) This will set outputs of test graph for FixShape and FixPadding transform Signed-off-by: SaeHie Park --- diff --git a/compiler/moco-tf/src/Transforms/FixPaddingTransform.test.cpp b/compiler/moco-tf/src/Transforms/FixPaddingTransform.test.cpp index eb90b64..cdcafe1 100644 --- a/compiler/moco-tf/src/Transforms/FixPaddingTransform.test.cpp +++ b/compiler/moco-tf/src/Transforms/FixPaddingTransform.test.cpp @@ -17,6 +17,8 @@ #include "FixPaddingTransform.h" #include "FixShapeTransform.h" +#include "TestHelper.h" + #include "Annotations/PaddingData.h" #include "Annotations/ShapeInferenceData.h" @@ -26,6 +28,8 @@ #include +using namespace moco::tf::test; + TEST(FixPaddingTransform, ctor) { moco::tf::FixPaddingTransform fptransform; @@ -76,6 +80,8 @@ void conv2d_test(const std::array ifm_shape, const std::arrayifm(ifm_node); conv2d_node->ker(ker_node); + setup_output_node(&graph, conv2d_node); + auto padding_data = stdex::make_unique(padding); conv2d_node->annot(std::move(padding_data)); diff --git a/compiler/moco-tf/src/Transforms/FixShapeTransform.test.cpp b/compiler/moco-tf/src/Transforms/FixShapeTransform.test.cpp index ad08681..4e51420 100644 --- a/compiler/moco-tf/src/Transforms/FixShapeTransform.test.cpp +++ b/compiler/moco-tf/src/Transforms/FixShapeTransform.test.cpp @@ -16,6 +16,8 @@ #include "FixShapeTransform.h" +#include "TestHelper.h" + #include "Annotations/PaddingData.h" #include "Annotations/ShapeInferenceData.h" @@ -25,6 +27,8 @@ #include +using namespace moco::tf::test; + TEST(FixShapeTransform, ctor) { moco::tf::FixShapeTransform fstransform; @@ -64,6 +68,8 @@ loco::AvgPool2D *avgpool2d_network_simple1331(loco::Graph *graph) } avgpool2d_node->ifm(const_node); + setup_output_node(graph, avgpool2d_node); + return avgpool2d_node; } @@ -156,6 +162,8 @@ void conv2d_test(const std::array ifm_shape, const std::arrayifm(ifm_node); conv2d_node->ker(ker_node); + setup_output_node(&graph, conv2d_node); + auto padding_data = stdex::make_unique(padding); conv2d_node->annot(std::move(padding_data));