[enco] Do NOT use deprecated Window2D methods in Caffe frontend (#1558)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 19 Sep 2018 04:21:18 +0000 (13:21 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 19 Sep 2018 04:21:18 +0000 (13:21 +0900)
This commit eliminates the use of deprecated methods in Window2D from
Caffe frontend implementation.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/enco/frontend/caffe/src/Frontend.cpp

index 8699a3a..cff3363 100644 (file)
@@ -308,8 +308,8 @@ enco::Bundle Frontend::load(void) const
       builders[PoolingMethod::Max] = [](coco::Module *m, const PoolingSpec &spec) {
         auto op = m->entity()->op()->create<coco::MaxPool2D>();
 
-        op->window()->vertical(spec.window_height());
-        op->window()->horizontal(spec.window_width());
+        op->window()->height(spec.window_height());
+        op->window()->width(spec.window_width());
 
         op->stride()->vertical(spec.vertical_stride());
         op->stride()->horizontal(spec.horizontal_stride());
@@ -329,8 +329,9 @@ enco::Bundle Frontend::load(void) const
         // NOTE Caffe use static divisor on average pooling
         op->divisor(coco::AvgPool2D::Divisor::Static);
 
-        op->window()->vertical(spec.window_height());
-        op->window()->horizontal(spec.window_height());
+        op->window()->height(spec.window_height());
+        // TODO FIX THIS BUG AND ADD TEST
+        op->window()->width(spec.window_height());
 
         op->stride()->vertical(spec.vertical_stride());
         op->stride()->horizontal(spec.horizontal_stride());