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