Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#429 from emailweixu/math_mul
Browse files Browse the repository at this point in the history
'*' operator overload for LayerOutput
  • Loading branch information
Haonan authored Nov 11, 2016
2 parents 8295eb9 + 36fa251 commit a276684
Show file tree
Hide file tree
Showing 7 changed files with 294 additions and 49 deletions.
6 changes: 6 additions & 0 deletions doc/ui/api/trainer_config_helpers/layers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ expand_layer
:members: expand_layer
:noindex:

repeat_layer
------------
.. automodule:: paddle.trainer_config_helpers.layers
:members: repeat_layer
:noindex:

Math Layers
===========

Expand Down
2 changes: 1 addition & 1 deletion python/paddle/trainer/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3015,7 +3015,7 @@ def Layer(
layer_func = layers.get(type)
config_assert(layer_func,
"layer type '%s' not supported." % type)
layer_func(name, **xargs)
return layer_func(name, **xargs)

@config_func
def ParameterHook(
Expand Down
3 changes: 3 additions & 0 deletions python/paddle/trainer_config_helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@
from networks import *
from optimizers import *
from attrs import *

# This will enable operator overload for LayerOutput
import math
Loading

0 comments on commit a276684

Please sign in to comment.