mirror of
https://github.com/wassname/denoising-diffusion-pytorch.git
synced 2026-09-09 11:21:11 +08:00
fix small bug with gradient accumulation
This commit is contained in:
@@ -414,7 +414,7 @@ class Trainer(object):
|
||||
data = next(self.dl).cuda()
|
||||
loss = self.model(data)
|
||||
print(f'{ind}: {loss.item()}')
|
||||
loss.backward()
|
||||
(loss / self.gradient_accumulate_every).backward()
|
||||
|
||||
self.opt.step()
|
||||
self.opt.zero_grad()
|
||||
|
||||
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
|
||||
setup(
|
||||
name = 'denoising-diffusion-pytorch',
|
||||
packages = find_packages(),
|
||||
version = '0.1.3',
|
||||
version = '0.1.4',
|
||||
license='MIT',
|
||||
description = 'Denoising Diffusion Probabilistic Models - Pytorch',
|
||||
author = 'Phil Wang',
|
||||
|
||||
Reference in New Issue
Block a user