Skip to content

fix(train): discriminator B aliased to discriminator A in (+1 more) - #91

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/train-assorted-f7170561
Open

fix(train): discriminator B aliased to discriminator A in (+1 more)#91
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/train-assorted-f7170561

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Small fixes in train.py:

fix: discriminator B aliased to discriminator A in DataParallel

Fix: Replace:

if num_gpu>1:
    print('Now you are using %d gpus.'%num_gpu)
    trainer.dis_a = torch.nn.DataParallel(trainer.dis_a, gpu_ids)
    trainer.dis_b = trainer.dis_a
    trainer = torch.nn.DataParallel(trainer, gpu_ids)

with:

if num_gpu>1:
    print('Now you are using %d gpus.'%num_gpu)
    trainer.dis_a = torch.nn.DataParallel(trainer.dis_a, gpu_ids)
    trainer.dis_b = torch.nn.DataParallel(trainer.dis_b, gpu_ids)
    trainer = torch.nn.DataParallel(trainer, gpu_ids)

fix: random.seed(7) only seeds numpy, not torch RNG

Fix: Replace:

random.seed(7) #fix random result

with:

random.seed(7) #fix random result
torch.manual_seed(7)

Files changed

  • train.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review August 3, 2026 22:10
@andrewwhitecdw

Copy link
Copy Markdown
Author

Closing this sweep-generated PR: sole commit is missing a valid Signed-off-by trailer. It does not meet the sweep requirements (single signed-off commit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant