Skip to content

Commit

Permalink
Add a CLI argument to seed the RNG
Browse files Browse the repository at this point in the history
Objective: compare the effect of eigenvectors on the same samples.
  • Loading branch information
woctezuma committed Sep 22, 2020
1 parent 4c54835 commit c5d726c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apply_factor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
type=str,
help="name of the closed form factorization result factor file",
)
parser.add_argument(
"--torch_seed",
type=int,
default=0,
help="seed for generating random numbers",
)

args = parser.parse_args()

Expand All @@ -61,6 +67,7 @@

trunc = g.mean_latent(4096)

torch.manual_seed(torch_seed)
latent = torch.randn(args.n_sample, 512, device=args.device)
latent = g.get_latent(latent)

Expand Down

0 comments on commit c5d726c

Please sign in to comment.