Let there be a TensorFlow tensor - for example [0.1,0.2,0.3,0.4]. I want to round up k greatest elements and round down the rest. (for example, when k=2, I wish to get [0,0,1,1]. When k=3, I wish to get [0,1,1,1].)
I want to implement this function using only TensorFlow operations. How do I achieve this?