Skip to content

Commit

Permalink
Remove self loop gain.
Browse files Browse the repository at this point in the history
  • Loading branch information
janchorowski committed Apr 1, 2021
1 parent 97993a7 commit 1f66873
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpc/criterion/soft_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ def __init__(self,
self.allowed_skips_beg = allowed_skips_beg
self.allowed_skips_end = allowed_skips_end
self.predict_self_loop = predict_self_loop
if predict_self_loop:
self.self_loop_gain = torch.nn.Parameter(torch.ones(1))
else:
self.register_parameter('self_loop_gain', None)
# if predict_self_loop:
# self.self_loop_gain = torch.nn.Parameter(torch.ones(1))
# else:
# self.register_parameter('self_loop_gain', None)
self.limit_negs_in_batch = limit_negs_in_batch

if masq_rules:
Expand Down Expand Up @@ -325,7 +325,7 @@ def forward(self, cFeature, encodedData, label, captureOptions=None, return_loca
# old and buggy
# extra_preds.append(cFeature.unsqueeze(-1))
# new and shiny
extra_preds.append(encodedData[:, :windowSize, :].unsqueeze(-1) * self.self_loop_gain)
extra_preds.append(encodedData[:, :windowSize, :].unsqueeze(-1) ) # * self.self_loop_gain)

if extra_preds:
nPredicts += len(extra_preds)
Expand Down

0 comments on commit 1f66873

Please sign in to comment.