Exemple #1
0
 def sample(self):
     u = tf.random_uniform(tf.shape(self.logits))
     return U.argmax(self.logits - tf.log(-tf.log(u)), axis=1)
Exemple #2
0
 def mode(self):
     return U.argmax(self.logits, axis=1)