update with new and improved cosine noise scheduler

This commit is contained in:
Phil Wang
2020-10-09 21:21:02 -07:00
parent 3d96532c60
commit ff451f697e
3 changed files with 25 additions and 17 deletions
+4 -8
View File
@@ -27,10 +27,8 @@ model = Unet(
diffusion = GaussianDiffusion(
model,
beta_start = 0.0001,
beta_end = 0.02,
num_diffusion_timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2 (wavegrad paper claims l1 is better?)
timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2
)
training_images = torch.randn(8, 3, 128, 128)
@@ -54,10 +52,8 @@ model = Unet(
diffusion = GaussianDiffusion(
model,
beta_start = 0.0001,
beta_end = 0.02,
num_diffusion_timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2
timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2
).cuda()
trainer = Trainer(