style correction

This commit is contained in:
Quandwang 2022-07-21 20:16:56 +08:00
parent 878026864c
commit dd393b5d72

View File

@ -183,13 +183,19 @@ class MultiheadAttention(nn.Module):
if not self._qkv_same_embed_dim: if not self._qkv_same_embed_dim:
q_proj_weight = ( q_proj_weight = (
self.q_proj_weight.get_weight() if self.q_proj_weight is not None else None self.q_proj_weight.get_weight()
if self.q_proj_weight is not None
else None
) )
k_proj_weight = ( k_proj_weight = (
self.k_proj_weight.get_weight() if self.k_proj_weight is not None else None self.k_proj_weight.get_weight()
if self.k_proj_weight is not None
else None
) )
v_proj_weight = ( v_proj_weight = (
self.v_proj_weight.get_weight() if self.v_proj_weight is not None else None self.v_proj_weight.get_weight()
if self.v_proj_weight is not None
else None
) )
( (
attn_output, attn_output,