[enco.caffe] Emit Eval instruction for ReLU (#1832)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 11 Oct 2018 05:28:04 +0000 (14:28 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 11 Oct 2018 05:28:04 +0000 (14:28 +0900)
With this commit, caffe frontend now emits Eval instruction (instead of
UnitF) for ReLU layers.

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

index 31e1793..12907fa 100644 (file)
@@ -419,15 +419,20 @@ enco::Bundle Frontend::load(void) const
       ofm_obj->bag(ofm_bag);
       ofm_obj->layout(coco::FeatureLayouts::BCHW::create(ofm_obj->shape()));
 
+      // Create a Load Op
+      auto load = m->entity()->op()->create<coco::Load>();
+
+      load->object(ifm_obj);
+
       // Create a ReLU op
       auto op = m->entity()->op()->create<coco::ReLU>();
 
-      // Create a UnitF instruction
-      // TODO Use UnitT later
-      auto ins = m->entity()->instr()->create<coco::UnitF>();
+      op->arg(load);
 
-      ins->ifm(ifm_obj);
-      ins->ofm(ofm_obj);
+      // Create a Eval instruction
+      auto ins = m->entity()->instr()->create<coco::Eval>();
+
+      ins->out(ofm_obj);
       ins->op(op);
 
       // Append the instruction to the block