Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openfold/model/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,12 @@ def _prep_qkv(self,
k = self.linear_k(kv_x)
v = self.linear_v(kv_x)

# [*, Q/K, H, C_hidden]
# [*, Q/K/V, H, C_hidden]
q = q.view(q.shape[:-1] + (self.no_heads, -1))
k = k.view(k.shape[:-1] + (self.no_heads, -1))
v = v.view(v.shape[:-1] + (self.no_heads, -1))

# [*, H, Q/K, C_hidden]
# [*, H, Q/K/V, C_hidden]
q = q.transpose(-2, -3)
k = k.transpose(-2, -3)
v = v.transpose(-2, -3)
Expand Down
2 changes: 1 addition & 1 deletion openfold/model/triangular_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
c_in:
Input channel dimension
c_hidden:
Overall hidden channel dimension (not per-head)
Per-head hidden channel dimension
no_heads:
Number of attention heads
"""
Expand Down