From 189ccb86ab6328fdd1a003a9ca1c3b601011e54e Mon Sep 17 00:00:00 2001 From: HuangBingjian Date: Wed, 29 Jul 2020 18:00:17 +0800 Subject: [PATCH] Change the indent for float16 --- mindspore/core/ir/tensor.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mindspore/core/ir/tensor.cc b/mindspore/core/ir/tensor.cc index c7f3b8fce8..1823b3f02c 100644 --- a/mindspore/core/ir/tensor.cc +++ b/mindspore/core/ir/tensor.cc @@ -205,8 +205,13 @@ class TensorDataImpl : public TensorData { if (isScalar) { ss << value; } else { - ss << std::setw(15) << std::setprecision(8) << std::setiosflags(std::ios::scientific | std::ios::right) - << value; + if (std::is_same::value) { + ss << std::setw(11) << std::setprecision(4) << std::setiosflags(std::ios::scientific | std::ios::right) + << value; + } else { + ss << std::setw(15) << std::setprecision(8) << std::setiosflags(std::ios::scientific | std::ios::right) + << value; + } } linefeedThreshold = kThreshold1DFloat; } else if (type == kNumberTypeBool) {