fix no_pos call

pull/930/head
Hui Zhang 3 years ago
parent 506f2bfd20
commit 0cd30e48a9

@ -45,8 +45,7 @@ class TransformerLM(nn.Layer, LMInterface, BatchScorerInterface):
if pos_enc == "sinusoidal":
pos_enc_layer_type = "abs_pos"
elif pos_enc is None:
#TODO
pos_enc_layer_type = "None"
pos_enc_layer_type = "no_pos"
else:
raise ValueError(f"unknown pos-enc option: {pos_enc}")

@ -384,7 +384,7 @@ class TransformerEncoder(BaseEncoder):
Args:
xs (paddle.Tensor): Input tensor. (B, T, D)
masks (paddle.Tensor): Mask tensor. (B, 1, T)
masks (paddle.Tensor): Mask tensor. (B, T, T)
cache (List[paddle.Tensor]): List of cache tensors.
Returns:

Loading…
Cancel
Save