Skip to content

Commit 59e1092

Browse files
authored
Expose maxout Python API. (#11278)
* Expose maxout API. * Fix code style.
1 parent 062d5a5 commit 59e1092

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

python/paddle/fluid/layers/ops.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
'sum',
7474
'polygon_box_transform',
7575
'shape',
76+
'maxout',
7677
] + __activations__
7778

7879
for _OP in set(__all__):

python/paddle/fluid/tests/unittests/test_layers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,14 @@ def test_polygon_box_transform(self):
387387
self.assertIsNotNone(output)
388388
print(str(program))
389389

390+
def test_maxout(self):
391+
program = Program()
392+
with program_guard(program):
393+
data = layers.data(name='x', shape=[8, 6, 6], dtype="float32")
394+
output = layers.maxout(x=data, groups=2)
395+
self.assertIsNotNone(output)
396+
print(str(program))
397+
390398

391399
if __name__ == '__main__':
392400
unittest.main()

0 commit comments

Comments
 (0)