From 7ad94915be170c6a01b114d748064ac44bbbad66 Mon Sep 17 00:00:00 2001 From: Parichay Kapoor Date: Fri, 23 Oct 2020 15:36:26 +0900 Subject: [PATCH] [layer] Print layer name over layer address Print layer name if available if layer name is not avaiable, then print layer object name and its address **Self evaluation:** 1. Build test: [x]Passed [ ]Failed [ ]Skipped 2. Run test: [x]Passed [ ]Failed [ ]Skipped Signed-off-by: Parichay Kapoor --- nntrainer/src/layer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nntrainer/src/layer.cpp b/nntrainer/src/layer.cpp index 2850157..4438e0a 100644 --- a/nntrainer/src/layer.cpp +++ b/nntrainer/src/layer.cpp @@ -269,7 +269,10 @@ void Layer::printPreset(std::ostream &out, PrintPreset preset) { void Layer::print(std::ostream &out, unsigned int flags) { if (flags & PRINT_INST_INFO) { out << "==================="; - printInstance(out, this); + if (getName().empty()) + printInstance(out, this); + else + out << "<" << getName() << ">" << std::endl; out << "Layer Type: " << static_cast::type>(type) -- 2.7.4