Fix code style

This commit is contained in:
pkufool 2021-09-13 17:34:07 +08:00
parent d58cd7b39d
commit dad5680920
3 changed files with 2 additions and 4 deletions

View File

@ -452,7 +452,6 @@ class RelPositionMultiheadAttention(nn.Module):
self._reset_parameters()
def _reset_parameters(self) -> None:
nn.init.xavier_uniform_(self.in_proj.weight)
nn.init.constant_(self.in_proj.bias, 0.0)
@ -682,7 +681,6 @@ class RelPositionMultiheadAttention(nn.Module):
_b = _b[_start:]
v = nn.functional.linear(value, _w, _b)
if attn_mask is not None:
assert (
attn_mask.dtype == torch.float32

View File

@ -139,7 +139,8 @@ def get_params() -> AttributeDict:
- subsampling_factor: The subsampling factor for the model.
- use_feat_batchnorm: Whether to do batch normalization for the input features.
- use_feat_batchnorm: Whether to do batch normalization for the
input features.
- attention_dim: Hidden dim for multi-head attention model.

View File

@ -108,7 +108,6 @@ def get_parser():
""",
)
parser.add_argument(
"--export",
type=str2bool,