def sample(self): u = tf.random_uniform(tf.shape(self.logits)) return U.softmax(self.logits - tf.log(-tf.log(u)), axis=-1) # softmax
def sample(self): u = tf.random.uniform(tf.shape(input=self.logits)) return U.softmax(self.logits - tf.math.log(-tf.math.log(u)), axis=-1)
def mode(self): return U.softmax(self.logits, axis=-1)
def sample(self): u = tf.random_uniform(tf.shape(self.logits)) rand_logits = self.logits - tf.log(-tf.log(u)) # return rand_logits return U.softmax(rand_logits, axis=-1)