1from pokemon_gan_model import Generator
2import torch
3
4G = Generator()
5G.load_state_dict(torch.load("pokemon_gan_generator.pth", map_location="cpu"))
6G.eval()
7
8z = torch.randn(1, 100)
9with torch.no_grad():
10 img = G(z) # (1, 3, 64, 64) in [-1, 1]