math_ops.py 452 字节
Newer Older
1 2 3
from paddle.trainer_config_helpers import *
from paddle.trainer_config_helpers import math

Q
qijun 已提交
4
settings(batch_size=1000, learning_rate=1e-5)
5 6 7 8 9 10 11 12 13 14 15 16 17 18

x = data_layer(name='data', size=100)
x = math.exp(x)
x = math.log(x)
x = math.abs(x)
x = math.sigmoid(x)
x = math.square(x)
x = math.square(x)
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)