commit | b413a957b5a1bd4270a6d1270ad9a705d96864c8 | [log] [tgz] |
---|---|---|
author | Jerry Ge <jerry.ge@arm.com> | Mon May 08 19:17:22 2023 +0000 |
committer | Jerry Ge <jerry.ge@arm.com> | Mon May 08 19:42:24 2023 +0000 |
tree | 2213f761935c7445dd91fe56c1e726c2802076fd | |
parent | cfcb20d08c4c409bbcd2d2dde6ca5ecdac299454 [diff] [blame] |
Fix empty shaped serialized tensor Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I512181cca1a3b1ed5d9a5435dbf11d7efcdbc2a5
diff --git a/src/tosa_serialization_handler.cpp b/src/tosa_serialization_handler.cpp index d782213..25ac5df 100644 --- a/src/tosa_serialization_handler.cpp +++ b/src/tosa_serialization_handler.cpp
@@ -26,7 +26,10 @@ { _dtype = dtype; - std::copy(shape->begin(), shape->end(), std::back_inserter(_shape)); + if (shape) + { + std::copy(shape->begin(), shape->end(), std::back_inserter(_shape)); + } assert(name); _name = name->str();