提交 0cd30e48 编写于 作者: H Hui Zhang

fix no_pos call

上级 506f2bfd
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册