Skip to content
Snippets Groups Projects
Commit 569a8b38 authored by Alexandre Chapin's avatar Alexandre Chapin :race_car:
Browse files

Change device

parent be1c9aa6
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,7 @@ class TwoWayAttentionBlock(nn.Module):
# Cross attention block, tokens attending to image embedding
q = queries + query_pe
k = keys + key_pe
q, k, keys = q.to(queries.device), k.to(queries.device), keys.to(queries.device)
attn_out = self.cross_attn_token_to_image(q=q, k=k, v=keys)
queries = queries + attn_out
self.norm2 = self.norm2.to(queries.device)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment