Skip to content

Commit

Permalink
Correct tensor printing format when tensor is in gpu.
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabheights committed Oct 22, 2023
1 parent 3ddc69b commit eba27ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/open3d/core/Tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ std::string Tensor::ToString(bool with_suffix,
std::ostringstream rc;
if (IsCUDA() || !IsContiguous()) {
Tensor host_contiguous_tensor = Contiguous().To(Device("CPU:0"));
rc << host_contiguous_tensor.ToString(false, "");
rc << host_contiguous_tensor.ToString(with_suffix, indent);
} else {
if (shape_.NumElements() == 0) {
rc << indent;
Expand Down

0 comments on commit eba27ef

Please sign in to comment.