tf.constant(7) code example
Example: what does tf.constant do
# Constant 1-D Tensor from a python list.tf.constant([1, 2, 3, 4, 5, 6])<tf.Tensor: shape=(6,), dtype=int32, numpy=array([1, 2, 3, 4, 5, 6], dtype=int32)># Or a numpy arraya = np.array([[1, 2, 3], [4, 5, 6]])tf.constant(a)<tf.Tensor: shape=(2, 3), dtype=int64, numpy= array([[1, 2, 3], [4, 5, 6]])>