Skip to content

Commit 730fd07

Browse files
committed
Add dtype to tensor to_string() #110
1 parent 9ea9519 commit 730fd07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cppflow/ops.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace cppflow {
7979

8080

8181
inline std::string to_string(const tensor &t) {
82-
auto res_tensor = string_format({t.shape(), t}, "(tensor: shape=%s, data=\n%s)");
82+
auto res_tensor = string_format({t.shape(), t}, "(tensor: shape=%s, dtype="+ to_string(t.dtype()) + ", data=\n%s)");
8383
auto res_tensor_h = res_tensor.get_tensor();
8484

8585
#ifdef TENSORFLOW_C_TF_TSTRING_H_

0 commit comments

Comments
 (0)