diff --git a/ge/common/formats/format_transfers/datatype_transfer.cc b/ge/common/formats/format_transfers/datatype_transfer.cc index 54600000..ba3fcdf3 100644 --- a/ge/common/formats/format_transfers/datatype_transfer.cc +++ b/ge/common/formats/format_transfers/datatype_transfer.cc @@ -141,7 +141,7 @@ Status DataTypeTransfer::TransDataType(const CastArgs &args, TransResult &result } if (args.src_data_size > static_cast(SIZE_MAX / size)) { std::string error = "args.src_data_size" + FmtToStr(args.src_data_size) + - " or data type size" + FmtToStr(std::to_string(size)) + " is too big"; + " or data type size" + FmtToStr(size) + " is too big"; GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, error.c_str()); return PARAM_INVALID; } diff --git a/ge/common/formats/utils/formats_trans_utils.cc b/ge/common/formats/utils/formats_trans_utils.cc index 8a4b0729..18f2d70f 100755 --- a/ge/common/formats/utils/formats_trans_utils.cc +++ b/ge/common/formats/utils/formats_trans_utils.cc @@ -59,7 +59,7 @@ int64_t GetItemNumByShape(const std::vector &shape) { bool CheckShapeValid(const std::vector &shape, const int64_t expect_dims) { if (expect_dims <= 0 || shape.size() != static_cast(expect_dims)) { - std::string error = " Invalid shape, dims num " + FmtToStr(shape.size()) + + std::string error = "Invalid shape, dims num " + FmtToStr(shape.size()) + ", expect " + FmtToStr(expect_dims); GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, error.c_str()); return false; @@ -74,7 +74,7 @@ bool IsShapeValid(const std::vector &shape) { int64_t num = 1; for (auto dim : shape) { if (dim < 0) { - std::string error = "Invalid negative dims in the shape " + FmtToStr(ShapeToString(shape)); + std::string error = "Invalid negative dims in the shape " + FmtToStr(ShapeToString(shape)); GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, error.c_str()); return false; }