This commit revises 'Output' class to record its name.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
#include <nncc/core/ADT/tensor/Shape.h>
+#include <string>
+
namespace coco
{
private:
Bag *_bag;
+
+public:
+ const std::string &name(void) const { return _name; }
+ void name(const std::string &s) { _name = s; }
+
+private:
+ std::string _name;
};
} // namespace coco
output.bag(&bag);
ASSERT_EQ(output.bag(), &bag);
}
+
+TEST(IR_OUTPUT, name_update)
+{
+ const nncc::core::ADT::tensor::Shape shape{1, 3, 3, 1};
+ coco::Output output{shape};
+
+ output.name("softmax");
+ ASSERT_EQ(output.name(), "softmax");
+}