dgmvae/nn_lib.py
def gumbel_softmax_sample(self, logits, temperature, use_gpu):
        """ Draw a sample from the Gumbel-Softmax distribution"""
        eps = self.sample_gumbel(logits, use_gpu)
        y = logits + eps
        return F.softmax(y / temperature, dim=y.dim()-1)
 Draw a sample from the Gumbel-Softmax distribution
Draw a sample from the Gumbel-Softmax distribution
Draw a sample from the Gumbel - Softmax distribution
def gumbel_softmax_sample(self, logits, temperature, use_gpu):
        eps = self.sample_gumbel(logits, use_gpu)
        y = logits + eps
        return F.softmax(y / temperature, dim=y.dim()-1)
def gumbel_softmax_sample ( self , logits , temperature , use_gpu ) : eps = self . sample_gumbel ( logits , use_gpu ) y = logits + eps return F . softmax ( y / temperature , dim = y . dim ( ) - 1 )
Draw a sample from the Gumbel-Softmax distribution
Draw a sample from the Gumbel - Softmax distribution
""" Draw a sample from the Gumbel-Softmax distribution"""
self
logits
temperature
use_gpu