math_ops.py 441 字节
Newer Older
1 2
from paddle.trainer_config_helpers import *

Q
qijun 已提交
3
settings(batch_size=1000, learning_rate=1e-5)
4 5

x = data_layer(name='data', size=100)
6 7 8 9 10 11
x = layer_math.exp(x)
x = layer_math.log(x)
x = layer_math.abs(x)
x = layer_math.sigmoid(x)
x = layer_math.square(x)
x = layer_math.square(x)
12 13 14 15 16 17
y = 1 + x
y = y + 1
y = x + y
y = y - x
y = y - 2
y = 2 - y
X
xuwei06 已提交
18 19
y = 2 * y
y = y * 3
Q
qijun 已提交
20
z = data_layer(name='data_2', size=1)
X
xuwei06 已提交
21 22 23 24
y = y * z
y = z * y
y = y + z
y = z + y
25
outputs(y)