Text Generation
Transformers
Safetensors
English
custom_code
qingsonglv commited on
Commit
c809379
1 Parent(s): 1cdd883

Update cross_visual.py

Browse files
Files changed (1) hide show
  1. cross_visual.py +1 -1
cross_visual.py CHANGED
@@ -794,4 +794,4 @@ class CrossVisionModel(nn.Module):
794
 
795
  def forward(self, images):
796
  enc = self.vit(images)
797
- return enc + self.pos_embed.unsqueeze(0)
 
794
 
795
  def forward(self, images):
796
  enc = self.vit(images)
797
+ return enc + self.pos_embed.to(enc.device).unsqueeze(0)