nikravan commited on
Commit
cf8f80d
1 Parent(s): 4da2485

fix colab error

Browse files
Files changed (1) hide show
  1. visual.py +1 -1
visual.py CHANGED
@@ -159,7 +159,7 @@ class EVA2CLIPModel(nn.Module):
159
 
160
  b, s, h = x.shape
161
  grid_size = int(s**0.5)
162
- x = x.view(b, grid_size, grid_size, h).permute(0, 3, 1, 2)
163
  x = self.conv(x)
164
 
165
  x = x.flatten(2).transpose(1, 2)
 
159
 
160
  b, s, h = x.shape
161
  grid_size = int(s**0.5)
162
+ x = x.contiguous().view(b, grid_size, grid_size, h).permute(0, 3, 1, 2)
163
  x = self.conv(x)
164
 
165
  x = x.flatten(2).transpose(1, 2)