I am trying to create a diagonal matrix using tf.get_variable But I do not know how! Like I can make a variable which is a diagonal matrix like:
dia_size = tf.zeros((num_filters, img_size))
b = tf.Variable(tf.matrix_diag(dia_size), name=name)
b = tf.reshape(b, [-1, img_size, img_size, num_filters])
but I can not do it with tf.get_variable.
Thanks for your help in advance!