You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Thanks for your great job for the implementation of DDPM with pytorch. It is my first time to do some research on diffusion model. After reading the file diffusion.py, I have several questions about the code and wonder I got some wrong understanding.
(1)In Line 144, there is a operation to restrict the value of x_{0} into (-1,1), but this function only return the value of mean and variance. I wonder if this line is unnecessary?
(2)I also have some problems with the function of the variable self.mean_type. I can understand that if self.mean_type='epsilon', the model can predict the epsilon_{theta} with loss function in Line 42: loss = F.mse_loss(self.model(x_t, t), noise, reduction='none'). I wonder if self.mean_type= 'xprev' or 'xstart', the loss function used to train the model should be changed as the model is required to predict the original sample x_{0} and former sample x_{t-1}? For example, if self.mean_type='xstart', loss = F.mse_loss(self.model(x_t, t), x_{0}, reduction='none')?
The text was updated successfully, but these errors were encountered:
The same question. I guessed the author was going to test different sampling algorithms which were not publicly recognized. I thought that the logic of the code should be corrected manually according to the original algorithm. And I've done it and suggested the sampling code did not correspond to the paper of DDPM.
Hello! Thanks for your great job for the implementation of DDPM with pytorch. It is my first time to do some research on diffusion model. After reading the file diffusion.py, I have several questions about the code and wonder I got some wrong understanding.
(1)In Line 144, there is a operation to restrict the value of x_{0} into (-1,1), but this function only return the value of mean and variance. I wonder if this line is unnecessary?
(2)I also have some problems with the function of the variable self.mean_type. I can understand that if self.mean_type='epsilon', the model can predict the epsilon_{theta} with loss function in Line 42: loss = F.mse_loss(self.model(x_t, t), noise, reduction='none'). I wonder if self.mean_type= 'xprev' or 'xstart', the loss function used to train the model should be changed as the model is required to predict the original sample x_{0} and former sample x_{t-1}? For example, if self.mean_type='xstart', loss = F.mse_loss(self.model(x_t, t), x_{0}, reduction='none')?
The text was updated successfully, but these errors were encountered: