Reputation: 214927
Sorry if this is obvious. But as the title says, what does it mean when I print a tensor in the console.
print(tf.constant([1,2]))
# Tensor("Const_7:0", shape=(2,), dtype=int32)
I understand the shape
and dtype
, but how about Const_7:0
? Const
looks to me is the operation
that creates the tensor. What is :0
then?
Upvotes: 0
Views: 213
Reputation: 1318
Const_7 means the name of this operation and name of an operation should be unique in a single graph. Port 0 means the first output tensor of this op. Some operation has many output tensors like tf.split and these tensors are named with the a port after the name of this operation.
Upvotes: 3