From c3c2683a13cde94d4d99f523cf4170384b00c34c Mon Sep 17 00:00:00 2001 From: Alexander Seiler <seileralex@gmail.com> Date: Thu, 27 Apr 2023 11:13:12 +0200 Subject: [PATCH] Correct some typos (#62) Signed-off-by: Alexander Seiler <seileralex@gmail.com> --- dinov2/loss/dino_clstoken_loss.py | 2 +- dinov2/loss/ibot_patch_loss.py | 2 +- dinov2/utils/utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dinov2/loss/dino_clstoken_loss.py b/dinov2/loss/dino_clstoken_loss.py index 77ff4ed..2f33897 100644 --- a/dinov2/loss/dino_clstoken_loss.py +++ b/dinov2/loss/dino_clstoken_loss.py @@ -58,7 +58,7 @@ class DINOLoss(nn.Module): Q /= torch.sum(Q, dim=0, keepdim=True) Q /= B - Q *= B # the colomns must sum to 1 so that Q is an assignment + Q *= B # the columns must sum to 1 so that Q is an assignment return Q.t() def forward(self, student_output_list, teacher_out_softmaxed_centered_list): diff --git a/dinov2/loss/ibot_patch_loss.py b/dinov2/loss/ibot_patch_loss.py index 135eb61..16bc5cf 100644 --- a/dinov2/loss/ibot_patch_loss.py +++ b/dinov2/loss/ibot_patch_loss.py @@ -87,7 +87,7 @@ class iBOTPatchLoss(nn.Module): Q /= torch.sum(Q, dim=0, keepdim=True) Q /= B - Q *= B # the colomns must sum to 1 so that Q is an assignment + Q *= B # the columns must sum to 1 so that Q is an assignment return Q.t() def forward(self, student_patch_tokens, teacher_patch_tokens, student_masks_flat): diff --git a/dinov2/utils/utils.py b/dinov2/utils/utils.py index 1d57f17..53e63eb 100644 --- a/dinov2/utils/utils.py +++ b/dinov2/utils/utils.py @@ -57,7 +57,7 @@ def get_sha(): sha = _run(["git", "rev-parse", "HEAD"]) subprocess.check_output(["git", "diff"], cwd=cwd) diff = _run(["git", "diff-index", "HEAD"]) - diff = "has uncommited changes" if diff else "clean" + diff = "has uncommitted changes" if diff else "clean" branch = _run(["git", "rev-parse", "--abbrev-ref", "HEAD"]) except Exception: pass -- GitLab