Skip to content

Commit

Permalink
ALLOW COMBINATION
Browse files Browse the repository at this point in the history
  • Loading branch information
Parry-Parry committed Nov 14, 2024
1 parent a14c74f commit 81d985b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rankers/train/loss/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ def step_d(self):
else:
self.t += 1
self.d_weight = self.d_weight * (self.t / self.T) ** 2

def step(self):
if self.t >= self.T:
pass
else:
self.t += 1
self.q_weight = self.q_weight * (self.t / self.T) ** 2
self.d_weight = self.d_weight * (self.t / self.T) ** 2

@staticmethod
def reg(reg, weight=0):
Expand Down

0 comments on commit 81d985b

Please sign in to comment.