In [1]:
import tensorflow as tf
In [16]:
matrix_diag = tf.constant([7,8,9,10])
In [17]:
matrix_diag_function = tf.diag(matrix_diag)
In [18]:
with tf.Session() as ses:
print ses.run(matrix_diag_function)
In [19]:
matrix_transp = tf.constant([[7,8,9],[10,11,12]])
In [20]:
matrix_transp_function = tf.transpose(matrix_transp)
In [21]:
with tf.Session() as ses:
print ses.run(matrix_transp_function)
In [ ]: