-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65be12d
commit 1c4bfc1
Showing
4 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
# PokeGAN | ||
GAN for generating pokemon sprites | ||
|
||
## Quickstart: | ||
|
||
In a virtual environment with Python 3.7+, install everything in `requirements.txt`. Then, run `test.py` | ||
|
||
Samples: | ||
|
||
                   |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import torch | ||
from aegan import Generator as G | ||
import torchvision.utils as vutils | ||
|
||
device = torch.device('cpu') | ||
netG = G() | ||
netG.load_state_dict(torch.load('trained_generator_weights.pt', map_location=device)) | ||
vec = torch.randn((32, 16)) | ||
with torch.no_grad(): | ||
fake = netG(vec) | ||
|
||
for i in range(32): | ||
vutils.save_image(fake.data[i], f'testfake.{i:02d}.png', normalize=True) |