diff --git a/.travis.yml b/.travis.yml index 702119b9af..8a97272e21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ matrix: addons: homebrew: # update: true - packages: python3 + packages: python3.6 before_install: - pip3 install virtualenv - virtualenv -p python3 ~/venv diff --git a/MANIFEST.in b/MANIFEST.in index 513268b828..7470034973 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -16,9 +16,9 @@ exclude *.svg recursive-include pytorch_lightning *.py # include examples -recursive-include examples *.py -recursive-include examples *.md -recursive-include examples *.sh +recursive-include pl_examples *.py +recursive-include pl_examples *.md +recursive-include pl_examples *.sh # exclude tests from package recursive-exclude tests * diff --git a/pl_examples/domain_templates/gan.py b/pl_examples/domain_templates/gan.py index 1e2c89f510..29f66768d0 100644 --- a/pl_examples/domain_templates/gan.py +++ b/pl_examples/domain_templates/gan.py @@ -136,7 +136,8 @@ class GAN(pl.LightningModule): # how well can it label as fake? fake = torch.zeros(imgs.size(0), 1) - fake_loss = self.adversarial_loss(self.discriminator(self.generated_imgs.detach()), fake) + fake_loss = self.adversarial_loss( + self.discriminator(self.generated_imgs.detach()), fake) # discriminator loss is the average of these d_loss = (real_loss + fake_loss) / 2 @@ -146,8 +147,6 @@ class GAN(pl.LightningModule): 'progress_bar': tqdm_dict, 'log': tqdm_dict }) - - return output def configure_optimizers(self): @@ -200,9 +199,12 @@ if __name__ == '__main__': parser = ArgumentParser() parser.add_argument("--batch_size", type=int, default=64, help="size of the batches") parser.add_argument("--lr", type=float, default=0.0002, help="adam: learning rate") - parser.add_argument("--b1", type=float, default=0.5, help="adam: decay of first order momentum of gradient") - parser.add_argument("--b2", type=float, default=0.999, help="adam: decay of first order momentum of gradient") - parser.add_argument("--latent_dim", type=int, default=100, help="dimensionality of the latent space") + parser.add_argument("--b1", type=float, default=0.5, + help="adam: decay of first order momentum of gradient") + parser.add_argument("--b2", type=float, default=0.999, + help="adam: decay of first order momentum of gradient") + parser.add_argument("--latent_dim", type=int, default=100, + help="dimensionality of the latent space") hparams = parser.parse_args() diff --git a/tox.ini b/tox.ini index 007b0a4783..79fa08197b 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands = check-manifest --ignore tox.ini python setup.py check -m -s flake8 . - coverage run --source pytorch_lightning -m py.test pytorch_lightning tests examples -v --doctest-modules + coverage run --source pytorch_lightning -m py.test pytorch_lightning tests pl_examples -v --doctest-modules [flake8] exclude = .tox,*.egg,build,temp,examples/*