qingsonglv
commited on
Commit
•
9c742a5
1
Parent(s):
bb6c740
Update visual.py
Browse files
visual.py
CHANGED
@@ -130,7 +130,7 @@ class EVA2CLIPModel(nn.Module):
|
|
130 |
x = self.transformer(x)
|
131 |
x = x[:, 1:]
|
132 |
x = self.linear_proj(x + self.pos_embed.to(x.device).unsqueeze(0))
|
133 |
-
boi = self.boi.expand(x.shape[0], -1, -1)
|
134 |
-
eoi = self.eoi.expand(x.shape[0], -1, -1)
|
135 |
x = torch.cat((boi, x, eoi), dim=1)
|
136 |
return x
|
|
|
130 |
x = self.transformer(x)
|
131 |
x = x[:, 1:]
|
132 |
x = self.linear_proj(x + self.pos_embed.to(x.device).unsqueeze(0))
|
133 |
+
boi = self.boi.to(x.device).expand(x.shape[0], -1, -1)
|
134 |
+
eoi = self.eoi.to(x.device).expand(x.shape[0], -1, -1)
|
135 |
x = torch.cat((boi, x, eoi), dim=1)
|
136 |
return x
|