Skip to content

Commit

Permalink
by minqi
Browse files Browse the repository at this point in the history
  • Loading branch information
Minqi824 committed Jun 4, 2023
1 parent 782518f commit 0e54186
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def criterion(self, y_true, y_pred, mode=None):
t = torch.linspace(0, 1, y_pred.size(0))
# 计算指数函数
exponential_decay = torch.exp(torch.log(torch.tensor(end / start)) * decay_factor * t) * start
exponential_decay = exponential_decay.to(y_pred.device)

idx_sort = torch.argsort(0.8 * y_true + 0.2 * y_pred)
y_pred = y_pred[idx_sort]
Expand Down

0 comments on commit 0e54186

Please sign in to comment.