Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 251 Bytes

File metadata and controls

16 lines (13 loc) · 251 Bytes
import tensorflow as tf

# create a tensor
hello = tf.constant('hello world')
print(hello)

>>> tf.Tensor(b'hello world', shape=(), dtype=string)

# to access a tensor value , call numpy()
hello.numpy()

>>>b'hello world'