Import Tensorflow

In [1]:
import tensorflow as tf
print(tf.__version__)
2.0.0

tf.constant creates a constant tensor.

Type and shape can be defined by providing the dtype
and shape parameters as argument to the function.

In [2]:
hello = tf.constant('Hello world!')

Let's print the specified tensor.

In [3]:
tf.print(hello)
Hello world!