qingsonglv commited on
Commit
d519da3
1 Parent(s): 9f15841

Update visual.py

Browse files
Files changed (1) hide show
  1. visual.py +2 -2
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