Deep Learning, Sora, Computer Vision, Transformers, Attention.
self.patch_size = patch_size self.pe = nn.Linear(2, embed_size) def forward(self, img_size): w, h = img_size x = torch.arange(0, w, self.patch_size) y = torch.arange(0, h, self.patch_size) X, Y = torch.meshgrid(x, y) centers = torch.stack((X.flatten(), Y.flatten()), dim=1) centers =