In [28]:
import tensorflow as tf
In [29]:
N=5
In [30]:
x1 = tf.diag(tf.ones(tf.stack([N, ]), dtype='float32'))
In [31]:
x2 = tf.stack([N, ])
In [37]:
x3 = tf.ones([1]).shape
In [38]:
init_op = tf.global_variables_initializer()
In [39]:
with tf.Session() as sess:
print(sess.run(0.01*x1))
print(x2.shape)
print(x3)
In [26]:
tf.ones([1])
Out[26]:
In [ ]: