Make model process any scale image

Related to #145
This commit is contained in:
Yonghye Kwon
2021-08-21 22:35:26 +09:00
committed by GitHub
parent d7d3febfe3
commit ca0bdca192

View File

@@ -72,7 +72,7 @@ class T2TViT(nn.Module):
cls_tokens = repeat(self.cls_token, '() n d -> b n d', b = b)
x = torch.cat((cls_tokens, x), dim=1)
x += self.pos_embedding
x += self.pos_embedding[:, :n+1]
x = self.dropout(x)
x = self.transformer(x)