未验证 提交 f3e2580c 编写于 作者: H hong19860320 提交者: GitHub

Fix the param of swish (#27824)

上级 070ac959
......@@ -2175,7 +2175,7 @@ class TestSwish(TestActivation):
x = np.random.uniform(-1, 1, [10, 12]).astype(self.dtype)
out = ref_swish(x)
self.inputs = {'X': x}
self.attrs = {'slope': 1.0}
self.attrs = {'beta': 1.0}
self.outputs = {'Out': out}
def test_check_grad(self):
......
......@@ -1183,7 +1183,7 @@ def swish(x, name=None):
"""
if in_dygraph_mode():
return core.ops.swish(x, 'slop', 1.0)
return core.ops.swish(x, 'beta', 1.0)
check_variable_and_dtype(x, 'x', ['float16', 'float32', 'float64'], 'swish')
helper = LayerHelper('swish', **locals())
......@@ -1192,7 +1192,7 @@ def swish(x, name=None):
type='swish',
inputs={'X': x},
outputs={'Out': out},
attrs={'slope': 1.0})
attrs={'beta': 1.0})
return out
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册