try swin
This commit is contained in:
parent
28a8352044
commit
d4ac470c54
@ -788,6 +788,8 @@ class WindowAttention(nn.Module):
|
|||||||
"""
|
"""
|
||||||
print(x.shape)
|
print(x.shape)
|
||||||
B_, C, N, _ = x.shape
|
B_, C, N, _ = x.shape
|
||||||
|
x = x.reshape(B_, C, N * N)
|
||||||
|
B_, C, N = x.shape
|
||||||
qkv_bias = None
|
qkv_bias = None
|
||||||
if self.q_bias is not None:
|
if self.q_bias is not None:
|
||||||
qkv_bias = torch.cat((self.q_bias, torch.zeros_like(self.v_bias, requires_grad=False), self.v_bias))
|
qkv_bias = torch.cat((self.q_bias, torch.zeros_like(self.v_bias, requires_grad=False), self.v_bias))
|
||||||
|
Loading…
Reference in New Issue
Block a user