Skip to content

Commit c26b2f8

Browse files
authored
Update main.py
1 parent c1ba69b commit c26b2f8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

main.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,20 @@
103103
# Update D
104104
optimizerD.step()
105105

106+
# TRAINING THE GENERATOR
107+
# netG.zero_grad()
108+
# target = Variable(torch.ones(real.size()[0])).to(device)
109+
# output = netD(generated)
106110
# TRAINING THE GENERATOR
107111
netG.zero_grad()
108112
target = Variable(torch.ones(real.size()[0])).to(device)
113+
generated = netG(profile)
114+
generated_eyes, generated_nose, generated_cheeks = netG(profile) # Extract the generated components
115+
109116
output = netD(generated)
117+
118+
119+
110120

111121
# G wants to :
112122
# (a) have the synthetic images be accepted by D (= look like frontal images of people)

0 commit comments

Comments
 (0)