"docs/source/vscode:/vscode.git/clone" did not exist on "c1e139c2b0ea6417b7306b3bff742f59b16f84e7"
Unverified Commit 4b7988eb authored by NielsRogge's avatar NielsRogge Committed by GitHub
Browse files

Fix assertion (#13369)

parent c4d78f01
......@@ -103,7 +103,7 @@ class ViTEmbeddings(nn.Module):
mode="bicubic",
align_corners=False,
)
assert int(h0) == patch_pos_embed.shape[-1] and int(w0) == patch_pos_embed.shape[-2]
assert int(h0) == patch_pos_embed.shape[-2] and int(w0) == patch_pos_embed.shape[-1]
patch_pos_embed = patch_pos_embed.permute(0, 2, 3, 1).view(1, -1, dim)
return torch.cat((class_pos_embed.unsqueeze(0), patch_pos_embed), dim=1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment