Skip to content
Snippets Groups Projects
Commit f963a38d authored by Engin Eren's avatar Engin Eren
Browse files

now Fake-Fake-Fake combination

parent 07057ffb
No related branches found
No related tags found
1 merge request!43crit peter
Pipeline #4217724 passed
...@@ -63,7 +63,7 @@ def train(args, aD, aG, aGE, device, train_loader, optimizer_d, optimizer_g, epo ...@@ -63,7 +63,7 @@ def train(args, aD, aG, aGE, device, train_loader, optimizer_d, optimizer_g, epo
optimizer_d.zero_grad() optimizer_d.zero_grad()
## Get Real data ## Get Real data
real_dataECAL = dataE.to(device).unsqueeze(1).float() #real_dataECAL = dataE.to(device).unsqueeze(1).float()
real_dataHCAL = dataH.to(device).unsqueeze(1).float() real_dataHCAL = dataH.to(device).unsqueeze(1).float()
label = energy.to(device).float() label = energy.to(device).float()
### ###
...@@ -78,10 +78,10 @@ def train(args, aD, aG, aGE, device, train_loader, optimizer_d, optimizer_g, epo ...@@ -78,10 +78,10 @@ def train(args, aD, aG, aGE, device, train_loader, optimizer_d, optimizer_g, epo
fake_dataHCAL = aG(z, label, fake_ecal).detach() ## 48 x 30 x 30 fake_dataHCAL = aG(z, label, fake_ecal).detach() ## 48 x 30 x 30
## Critic fwd pass on Real ## Critic fwd pass on Real
disc_real = aD(real_dataECAL, real_dataHCAL, label) disc_real = aD(fake_ecal, real_dataHCAL, label)
## Calculate Gradient Penalty Term ## Calculate Gradient Penalty Term
gradient_penalty = calc_gradient_penalty(aD, real_dataECAL, real_dataHCAL, fake_dataHCAL, label, args.batch_size, device, layer=48, xsize=30, ysize=30) gradient_penalty = calc_gradient_penalty(aD, fake_ecal, real_dataHCAL, fake_dataHCAL, label, args.batch_size, device, layer=48, xsize=30, ysize=30)
## Critic fwd pass on Fake HCAL ## Critic fwd pass on Fake HCAL
disc_fake = aD(fake_ecal, fake_dataHCAL.unsqueeze(1), label) disc_fake = aD(fake_ecal, fake_dataHCAL.unsqueeze(1), label)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment