提交 2582feca 编写于 作者: T tensor-tang

fix dtype

上级 215cdafe
......@@ -267,22 +267,22 @@ paddle.fluid.layers.pow ArgSpec(args=[], varargs='args', keywords='kwargs', defa
paddle.fluid.layers.stanh ArgSpec(args=[], varargs='args', keywords='kwargs', defaults=None)
paddle.fluid.layers.hard_sigmoid ArgSpec(args=[], varargs='args', keywords='kwargs', defaults=None)
paddle.fluid.layers.swish ArgSpec(args=[], varargs='args', keywords='kwargs', defaults=None)
paddle.fluid.layers.sigmoid ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.logsigmoid ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.exp ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.tanh ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.tanh_shrink ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.sqrt ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.abs ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.ceil ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.floor ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.cos ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.sin ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.round ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.reciprocal ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.square ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.softplus ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.softsign ArgSpec(args=['x'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.sigmoid ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.logsigmoid ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.exp ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.tanh ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.tanh_shrink ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.sqrt ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.abs ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.ceil ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.floor ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.cos ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.sin ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.round ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.reciprocal ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.square ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.softplus ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.softsign ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=None)
paddle.fluid.layers.uniform_random ArgSpec(args=['shape', 'dtype', 'min', 'max', 'seed'], varargs=None, keywords=None, defaults=(None, None, None, None))
paddle.fluid.layers.hard_shrink ArgSpec(args=['x', 'threshold'], varargs=None, keywords=None, defaults=(None,))
paddle.fluid.layers.cumsum ArgSpec(args=['x', 'axis', 'exclusive', 'reverse'], varargs=None, keywords=None, defaults=(None, None, None))
......
......@@ -220,11 +220,10 @@ def generate_layer_fn_noattr(op_type):
"""
op_proto = OpProtoHolder.instance().get_op_proto(op_type)
def func(x):
def func(x, name=None):
helper = LayerHelper(op_type, **locals())
output = helper.create_tmp_variable(dtype=helper.input_dtype())
helper.append_op(
type=op_type, inputs={"X": [x]}, outputs={"Out": [output]})
output = helper.create_tmp_variable(dtype=x.dtype)
helper.append_op(type=op_type, inputs={"X": x}, outputs={"Out": output})
return output
func.__name__ = op_type
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册