math_ops.py 462 字节
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
x = layer_math.exp(x)
x = layer_math.log(x)
x = layer_math.abs(x)
x = layer_math.sigmoid(x)
L
Luo Tao 已提交
10
x = layer_math.tanh(x)
11
x = layer_math.square(x)
L
Luo Tao 已提交
12
x = layer_math.relu(x)
13 14 15 16 17 18
y = 1 + x
y = y + 1
y = x + y
y = y - x
y = y - 2
y = 2 - y
X
xuwei06 已提交
19 20
y = 2 * y
y = y * 3
Q
qijun 已提交
21
z = data_layer(name='data_2', size=1)
X
xuwei06 已提交
22 23 24 25
y = y * z
y = z * y
y = y + z
y = z + y
26
outputs(y)