Browse Source

!10502 Delete tensor id print in to string

From: @joylvliang
Reviewed-by: @zh_qh,@ginfung
Signed-off-by: @zh_qh
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
8161e3fd47
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/core/ir/tensor.cc

+ 1
- 1
mindspore/core/ir/tensor.cc View File

@@ -553,7 +553,7 @@ std::string Tensor::ToStringInternal(int limit_size) const {
std::ostringstream buf;
auto dtype = Dtype();
MS_EXCEPTION_IF_NULL(dtype);
buf << "Tensor(id=" << id_ << ", shape=" << ShapeToString(shape_) << ", dtype=" << dtype->ToString() << ", value=";
buf << "Tensor(shape=" << ShapeToString(shape_) << ", dtype=" << dtype->ToString() << ", value=";
if (limit_size <= 0 || DataSize() < limit_size) {
// Only print data for small tensor.
buf << ((data().ndim() > 1) ? '\n' : ' ') << data().ToString(data_type_, shape_, false);


Loading…
Cancel
Save