Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rosinality committed Sep 18, 2020
2 parents f938922 + d1ef862 commit 7be6e64
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ppl.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ def lerp(a, b, t):
parser.add_argument(
"--crop", action="store_true", help="apply center crop to the images"
)
parser.add_argument(
"--sampling",
default="end",
choices=["end", "full"],
help="set endpoint sampling method",
)
parser.add_argument(
"ckpt", metavar="CHECKPOINT", help="path to the model checkpoints"
)
Expand Down Expand Up @@ -83,7 +89,10 @@ def lerp(a, b, t):
noise = g.make_noise()

inputs = torch.randn([batch * 2, latent_dim], device=device)
lerp_t = torch.rand(batch, device=device)
if args.sampling == "full":
lerp_t = torch.rand(batch, device=device)
else:
lerp_t = torch.zeros(batch, device=device)

if args.space == "w":
latent = g.get_latent(inputs)
Expand Down

0 comments on commit 7be6e64

Please sign in to comment.