I do not know why the value keeps changing every time it is calculated.
Here is my code:
import tensorflow as tf
sample_num = 10
radii = tf.random_uniform([sample_num,1],0,1)
norm1 = tf.reduce_max(radii,axis = 0)
init = tf.global_variables_initializer()
sess = tf.Session()
sess.run(init)
print(sess.run(norm1))
print(sess.run(norm1))
print(sess.run(norm1))
All three print statements give me different values.
norm1.shape
gives me TensorShape([Dimension(1)])
, so it looks like norm1
correctly caught the maximum.
I changed the sample number to 1 to see whether it keeps changing and it did.
Can anyone help me figure out what the problem is?