提交 7e02c366 编写于 作者: L lfchener

use core.op in add_position_encoding API.

上级 9484567b
......@@ -13166,6 +13166,10 @@ def add_position_encoding(input, alpha, beta, name=None):
input=tensor, alpha=1.0, beta=1.0)
"""
if in_dygraph_mode():
return core.ops.add_position_encoding(input, "alpha", alpha, "beta",
beta)
helper = LayerHelper('add_position_encoding', **locals())
check_variable_and_dtype(input, 'input', ['float32', 'float64'],
"add_position_encoding")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册