AntixK / PyTorch-VAE

A Collection of Variational Autoencoders (VAE) in PyTorch.
Apache License 2.0
6.44k stars 1.05k forks source link

Temperature setting in CAT-VAE model #79

Open dailingjun opened 1 year ago

dailingjun commented 1 year ago

The temperature in the CAT-VAE model is set in this way:

    if batch_idx % self.anneal_interval == 0 and self.training:
        self.temp = np.maximum(self.temp * np.exp(- self.anneal_rate * batch_idx),
                               self.min_temp)

'self.temp' is initialized by 0.5. 'self.min_temp' is initialized by 0.5 too. 'self.temp np.exp(- self.anneal_rate batch_idx)' is ALWAYS no larger than 'self.min_temp'. So 'self.temp' is ALWAYS equal to 'self.min_temp', namely 0.5. Something wrong?