Ones

import tensorflow as tf

import os

# Just disables the warning, doesn't enable AVX/FMA
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
a = tf.ones([2, 5])
a
<tf.Tensor 'ones:0' shape=(2, 5) dtype=float32>
with tf.Session() as sess:
    print(sess.run(a))
[[1. 1. 1. 1. 1.]
 [1. 1. 1. 1. 1.]]
b = tf.ones([1, 3], tf.int32)
with tf.Session() as sess:
    print(sess.run(b))
[[1 1 1]]