minor changes to the scripts

This commit is contained in:
Quandwang 2022-07-21 15:58:09 +08:00
parent 1ad9862b39
commit 40eb8c43c9
2 changed files with 2 additions and 3 deletions

View File

@ -62,6 +62,7 @@ class MultiheadAttention(nn.Module):
embed_dim,
num_heads,
dropout=0.0,
bias=True,
add_bias_kv=False,
add_zero_attn=False,
kdim=None,
@ -78,8 +79,6 @@ class MultiheadAttention(nn.Module):
self._qkv_same_embed_dim = (
self.kdim == embed_dim and self.vdim == embed_dim
)
self.bias = True
bias = self.bias
self.num_heads = num_heads
self.dropout = dropout

View File

@ -125,7 +125,7 @@ def get_parser():
parser.add_argument(
"--use-averaged-model",
type=str2bool,
default=False,
default=True,
help="Whether to load averaged model. Currently it only supports "
"using --epoch. If True, it would decode with the averaged model "
"over the epoch range from `epoch-avg` (excluded) to `epoch`."