Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#922 from reyoung/feature/fix_bugs_in_…
Browse files Browse the repository at this point in the history
…math

Fix bad import name in trainer_config_helpers.
  • Loading branch information
reyoung authored Dec 16, 2016
2 parents d5c7737 + 54cb6bd commit f94a0cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/paddle/trainer_config_helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
from attrs import *

# This will enable operator overload for LayerOutput
import math
import math as layer_math
13 changes: 6 additions & 7 deletions python/paddle/trainer_config_helpers/tests/configs/math_ops.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
from paddle.trainer_config_helpers import *
from paddle.trainer_config_helpers import math

settings(batch_size=1000, learning_rate=1e-5)

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)
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)
y = 1 + x
y = y + 1
y = x + y
Expand Down

0 comments on commit f94a0cc

Please sign in to comment.