Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiyangZhou committed Jun 7, 2021
1 parent 8de6b84 commit d43a78c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dassl/engine/ssl/fixmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ def build_data_loader(self):

def assess_y_pred_quality(self, y_pred, y_true, mask):
n_masked_correct = (y_pred.eq(y_true).float() * mask).sum()
acc_thre = n_masked_correct / (
mask.sum() + 1e-5
) # accuracy after threshold
acc_thre = n_masked_correct / (mask.sum() + 1e-5)
acc_raw = y_pred.eq(y_true).sum() / y_pred.numel() # raw accuracy
keep_rate = mask.sum() / mask.numel()
output = {
Expand Down

0 comments on commit d43a78c

Please sign in to comment.