[enco] Set Conv2D padding for ANN Subnet (#1264)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Fri, 31 Aug 2018 04:20:43 +0000 (13:20 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 31 Aug 2018 04:20:43 +0000 (13:20 +0900)
The current implementation assumes that padding is always 0. With this commit,
enco now sets Conv2D padding based on padding parameters that IR
provides.

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

index 5f1fa15..f2f9caf 100644 (file)
@@ -205,13 +205,13 @@ public:
       }
 
       auto left = _binder->addOperand<int32_t>();
-      _binder->setOperand(left, 0);
+      _binder->setOperand(left, conv->pad()->left());
       auto right = _binder->addOperand<int32_t>();
-      _binder->setOperand(right, 0);
+      _binder->setOperand(right, conv->pad()->right());
       auto top = _binder->addOperand<int32_t>();
-      _binder->setOperand(top, 0);
+      _binder->setOperand(top, conv->pad()->top());
       auto bottom = _binder->addOperand<int32_t>();
-      _binder->setOperand(bottom, 0);
+      _binder->setOperand(bottom, conv->pad()->bottom());
       auto hstride = _binder->addOperand<int32_t>();
       _binder->setOperand(hstride, conv->stride()->horizontal());
       auto vstride = _binder->addOperand<int32_t>();