[neurun][dotdumer] Fix model output naming bug (#3231)
author김수진/동작제어Lab(SR)/Engineer/삼성전자 <sjsujin.kim@samsung.com>
Thu, 18 Oct 2018 06:18:42 +0000 (15:18 +0900)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 18 Oct 2018 06:18:42 +0000 (15:18 +0900)
This commit fixes model output naming bug that shows the name with 'obj' prefix.

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
runtimes/neurun/src/dumper/dot/DotDumper.cc
runtimes/neurun/src/graph/Graph.cc

index fb7a7fc..dc431da 100644 (file)
@@ -50,18 +50,20 @@ void DotDumper::dump(const std::string &tag, uint32_t option)
 
   operands.iterate([&](const operand::Index &index, const operand::Object &object) {
     bool showing_cond = false;
-
+    auto usage = object.getUsage();
     if (option == OPTIONS::SHOW_CONSTANTS)
     {
       showing_cond = object.usageIsDefined();
     }
     else
     {
-      auto usage = object.getUsage();
       showing_cond = (usage == operand::OperandUsage::MODEL_INPUT) ||
                      (usage == operand::OperandUsage::OPERATION_OUTPUT);
     }
-    showing_cond = showing_cond && (object.getUses().size() > 0);
+    if (usage != operand::OperandUsage::OPERATION_OUTPUT)
+    {
+      showing_cond = showing_cond && (object.getUses().size() > 0);
+    }
     if (showing_cond)
     {
       neurun::dumper::dot::DotOperandInfo operand_info(index, object);
index 40a0682..e8560d9 100644 (file)
@@ -69,6 +69,7 @@ operation::Index Graph::insertPermute(const operand::Index &operand_index,
   // Generate output operand and permute operation
   auto out_operand_index = addOperand(operand.shape(), operand.typeInfo());
   auto &out_operand = _operands.at(out_operand_index);
+  out_operand.setAsOperationOutput();
   // change model output if operand_index is model output index
   auto &model_outputs = getOutputs();
   if (model_outputs.contains(operand_index))