if the value of a tensor is 0 tensorflow 2 code example Example: tensor get value #print the value of tensor mytensor.item()