Skip to content

Commit

Permalink
submodule added
Browse files Browse the repository at this point in the history
  • Loading branch information
hwnam831 committed Jan 18, 2023
1 parent 8c0fcaa commit 258b2ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lotr"]
path = lotr
url = https://github.com/FPSG-UIUC/lotr
7 changes: 4 additions & 3 deletions Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,10 @@ def __init__(self, args):

self.disc2 = Models.SVMDiscriminator(self.window2, clf, 0.02).cuda() #discriminator

#No doubleblind
def cooldown(args, env, gen, prevgen, epochs=None):
halfgen = gen.half()
halfgen.eval()
halfgen.train()
lastacc = 0.0
lastnorm = 0.0
lastacc2 = 0.0
Expand All @@ -285,7 +286,7 @@ def cooldown(args, env, gen, prevgen, epochs=None):
perturb = prevgen(shifted).view(shifted.size(0),-1)
perturb2 = halfgen(shifted.half()).float().detach()
#interleaving?
output = env.classifier_test(xdata[:,args.history-1:]+perturb.detach())
output = env.classifier_test(xdata[:,args.history-1:]+perturb2)
loss_c = criterion(output, ydata)
loss_c.backward()
optim_c_t.step()
Expand Down Expand Up @@ -341,7 +342,7 @@ def cooldown(args, env, gen, prevgen, epochs=None):
perturb = prevgen(shifted).view(shifted.size(0),-1)
perturb2 = halfgen(shifted.half()).float().detach()
#interleaving?
output = env.classifier_test2(xdata[:,args.history-1:]+perturb.detach())
output = env.classifier_test2(xdata[:,args.history-1:]+perturb2)
loss_c = criterion(output, ydata)
loss_c.backward()
optim_c_t2.step()
Expand Down
1 change: 1 addition & 0 deletions lotr
Submodule lotr added at 350e72

0 comments on commit 258b2ca

Please sign in to comment.