[enco] Correctly set ANN MaxPool2D padding (#1379)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 6 Sep 2018 05:37:58 +0000 (14:37 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 6 Sep 2018 05:37:58 +0000 (14:37 +0900)
This commit revises ANN IR builder to use padding configuration stored
in MaxPool2D op (instead of hard-coded ones)

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/core/src/Transforms/Split.cpp

index ca8c465..00e1317 100644 (file)
@@ -261,15 +261,15 @@ public:
     {
       auto ifm = _binder->addOperand<float>(unit->ifm());
 
-      // TODO Support padding
+      // Set padding
       auto left = _binder->addOperand<int32_t>();
-      _binder->setOperand(left, 0);
+      _binder->setOperand(left, maxpool->pad()->left());
       auto right = _binder->addOperand<int32_t>();
-      _binder->setOperand(right, 0);
+      _binder->setOperand(right, maxpool->pad()->right());
       auto top = _binder->addOperand<int32_t>();
-      _binder->setOperand(top, 0);
+      _binder->setOperand(top, maxpool->pad()->top());
       auto bottom = _binder->addOperand<int32_t>();
-      _binder->setOperand(bottom, 0);
+      _binder->setOperand(bottom, maxpool->pad()->bottom());
 
       // Set horizontal/vertical stride
       auto hstride = _binder->addOperand<int32_t>();