added amp level option

This commit is contained in:
William Falcon 2019-05-16 16:01:15 -04:00
parent eb13bb8313
commit 96903c7910
2 changed files with 4 additions and 4 deletions

View File

@ -378,9 +378,9 @@ class Trainer(TrainerIO):
else: else:
loss.backward() loss.backward()
if self.check_grad_nans: if self.check_grad_nans:
for param in self.model.parameters(): for param in self.model.parameters():
print(param.grad.float().sum()) print(param.grad.float().sum())
self.batch_loss_value += loss.item() self.batch_loss_value += loss.item()

View File

@ -7,7 +7,7 @@ from setuptools import setup, find_packages
# http://blog.ionelmc.ro/2014/05/25/python-packaging/ # http://blog.ionelmc.ro/2014/05/25/python-packaging/
setup( setup(
name="pytorch-lightning", name="pytorch-lightning",
version='0.1.dev1830', version='0.1.dev1831',
description="The Keras for ML researchers using PyTorch", description="The Keras for ML researchers using PyTorch",
author="William Falcon", author="William Falcon",
author_email="waf2107@columbia.edu", author_email="waf2107@columbia.edu",