question
hello! there way modify tensor ranked version of without using eval?
for example, [6, 4, 5] -> [3, 1, 2]?
context
i'm interested in using rank correlation cost function, , bandaid solution has been use session.run(tensor) numpy values, , modify rank correlation.
the issue far has been weights , biases don't change during training, leading me assume tensorflow isn't calculating meaningful gradient.
i've varied learning rate between number of values between (500 , 3e-8) see if issue. no luck, weights , biases remain unchanged.
you @ second output of tf.nn.top_k
positions of largest elements. ranks of elements in original list inverse of this, run top_k
on result
this gives positions of largest elements, want smallest instead of largest, need negate input top_k
a = tf.constant([6, 4, 5]) size = tf.size(a) indices_of_ranks = tf.nn.top_k(-a, k=size)[1] ranks_of_indices = tf.nn.top_k(-indices_of_ranks, k=size)[1] sess = tf.session() sess.run(ranks_of_indices+1)
Comments
Post a Comment