"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "6083c1566e261668a5de73cfe484c171ce232812"
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