Fix testing for mac OS (#399)
* fix test for MacOS * formatting * fix pkg names
This commit is contained in:
parent
58d52c25a1
commit
67f6e7bb19
|
@ -35,7 +35,7 @@ matrix:
|
|||
addons:
|
||||
homebrew:
|
||||
# update: true
|
||||
packages: python3
|
||||
packages: python3.6
|
||||
before_install:
|
||||
- pip3 install virtualenv
|
||||
- virtualenv -p python3 ~/venv
|
||||
|
|
|
@ -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 *
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
2
tox.ini
2
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/*
|
||||
|
|
Loading…
Reference in New Issue