• Source
    1. import tensorflow as tf
    2. a=tf.constant(5)
    3. b=tf.constant([1.0,2.0,3.0])
    4. c=tf.constant([[1,2],[3,4]])
    5. print(type(c),c.shape)
    6. W = tf.Variable(initial_value=tf.random.normal([2, 2]), name='weights')
    7. print(W)