Skip to content

Commit c785975

Browse files
authored
Merge pull request #1256 from luotao1/maxout
remove usused arguments for maxout_layer, refine notes for pad_layer
2 parents ccb553f + ca25b9a commit c785975

File tree

1 file changed

+22
-33
lines changed
  • python/paddle/trainer_config_helpers

1 file changed

+22
-33
lines changed

python/paddle/trainer_config_helpers/layers.py

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3677,26 +3677,27 @@ def pad_layer(input,
36773677
36783678
For example,
36793679
3680-
.. code-block::
3681-
3682-
input(2,2,2,3) = [
3683-
[ [[1,2,3], [3,4,5]],
3684-
[[2,3,5], [1,6,7]] ],
3685-
[ [[4,3,1], [1,8,7]],
3686-
[[3,8,9], [2,3,5]] ]
3687-
]
3688-
3689-
pad_c=[1,1], pad_h=[0,0], pad_w=[0,0]
3690-
output(2,4,2,3) = [
3691-
[ [[0,0,0], [0,0,0]],
3692-
[[1,2,3], [3,4,5]],
3693-
[[2,3,5], [1,6,7]],
3694-
[[0,0,0], [0,0,0]] ],
3695-
[ [[0,0,0], [0,0,0]],
3696-
[[4,3,1], [1,8,7]],
3697-
[[3,8,9], [2,3,5]],
3698-
[[0,0,0], [0,0,0]] ]
3699-
]
3680+
.. code-block:: python
3681+
3682+
input(2,2,2,3) = [
3683+
[ [[1,2,3], [3,4,5]],
3684+
[[2,3,5], [1,6,7]] ],
3685+
[ [[4,3,1], [1,8,7]],
3686+
[[3,8,9], [2,3,5]] ]
3687+
]
3688+
3689+
pad_c=[1,1], pad_h=[0,0], pad_w=[0,0]
3690+
3691+
output(2,4,2,3) = [
3692+
[ [[0,0,0], [0,0,0]],
3693+
[[1,2,3], [3,4,5]],
3694+
[[2,3,5], [1,6,7]],
3695+
[[0,0,0], [0,0,0]] ],
3696+
[ [[0,0,0], [0,0,0]],
3697+
[[4,3,1], [1,8,7]],
3698+
[[3,8,9], [2,3,5]],
3699+
[[0,0,0], [0,0,0]] ]
3700+
]
37003701
37013702
The simply usage is:
37023703
@@ -4191,13 +4192,7 @@ def block_expand_layer(input,
41914192

41924193
@wrap_name_default()
41934194
@layer_support()
4194-
def maxout_layer(input,
4195-
groups,
4196-
num_channels=None,
4197-
size_x=None,
4198-
size_y=None,
4199-
name=None,
4200-
layer_attr=None):
4195+
def maxout_layer(input, groups, num_channels=None, name=None, layer_attr=None):
42014196
"""
42024197
A layer to do max out on conv layer output.
42034198
- Input: output of a conv layer.
@@ -4227,12 +4222,6 @@ def maxout_layer(input,
42274222
:type num_channels: int|None
42284223
:param groups: The group number of input layer.
42294224
:type groups: int
4230-
:param size_x: conv output width. If None will be set
4231-
automatically from previous output.
4232-
:type size_x: int|None
4233-
:param size_y: conv output height. If None will be set
4234-
automatically from previous output.
4235-
:type size_y: int|None
42364225
:param name: The name of this layer, which can not specify.
42374226
:type name: None|basestring.
42384227
:param layer_attr: Extra Layer attribute.

0 commit comments

Comments
 (0)