| 305 | |
| 306 | |
| 307 | class LossType(enum.Enum): |
| 308 | MSE = enum.auto() # use raw MSE loss (and KL when learning variances) |
| 309 | RESCALED_MSE = ( |
| 310 | enum.auto() |
| 311 | ) # use raw MSE loss (with RESCALED_KL when learning variances) |
| 312 | KL = enum.auto() # use the variational lower-bound |
| 313 | RESCALED_KL = enum.auto() # like KL, but rescale to estimate the full VLB |
| 314 | |
| 315 | def is_vb(self): |
| 316 | return self == LossType.KL or self == LossType.RESCALED_KL |
| 317 | |
| 318 | |
| 319 | class GaussianDiffusion: |
nothing calls this directly
no outgoing calls
no test coverage detected