Commit 834ac30a authored by Luke Yeager's avatar Luke Yeager Committed by Soumith Chintala
Browse files

[Lint] Fix remaining lint manually

parent a137e4f4
......@@ -155,5 +155,6 @@ class Tester(unittest.TestCase):
l, = img.split()
assert np.allclose(l, img_data[:, :, 0])
if __name__ == '__main__':
unittest.main()
......@@ -39,8 +39,8 @@ class CIFAR10(data.Dataset):
self.download()
if not self._check_integrity():
raise RuntimeError('Dataset not found or corrupted.'
+ ' You can use download=True to download it')
raise RuntimeError('Dataset not found or corrupted.' +
' You can use download=True to download it')
# now load the picked numpy arrays
if self.train:
......
......@@ -128,9 +128,10 @@ class LSUN(data.Dataset):
def __repr__(self):
return self.__class__.__name__ + ' (' + self.db_path + ')'
if __name__ == '__main__':
#lsun = LSUNClass(db_path='/home/soumith/local/lsun/train/bedroom_train_lmdb')
#a = lsun[0]
# lsun = LSUNClass(db_path='/home/soumith/local/lsun/train/bedroom_train_lmdb')
# a = lsun[0]
lsun = LSUN(db_path='/home/soumith/local/lsun/train',
classes=['bedroom_train', 'church_outdoor_train'])
print(lsun.classes)
......
......@@ -32,8 +32,8 @@ class MNIST(data.Dataset):
self.download()
if not self._check_exists():
raise RuntimeError('Dataset not found.'
+ ' You can use download=True to download it')
raise RuntimeError('Dataset not found.' +
' You can use download=True to download it')
if self.train:
self.train_data, self.train_labels = torch.load(
......
......@@ -155,7 +155,7 @@ class Lambda(object):
"""Applies a lambda as a transform."""
def __init__(self, lambd):
assert type(lambd) is types.LambdaType
assert isinstance(lambd, types.LambdaType)
self.lambd = lambd
def __call__(self, img):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment