Skip to content

Commit 81bcb51

Browse files
pptt168wanggang255
andauthored
当activation=lambda x: x出现错误 (#330)
Co-authored-by: 路人咦 <1417954729@qq.com>
1 parent 3270b8b commit 81bcb51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fastNLP/modules/decoder/mlp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def __init__(self, size_layer, activation='relu', output_activation=None, initia
7171
f"the length of activation function list except {len(size_layer) - 2} but got {len(activation)}!")
7272
self.hidden_active = []
7373
for func in activation:
74-
if callable(activation):
75-
self.hidden_active.append(activation)
74+
if callable(func):
75+
self.hidden_active.append(func)
7676
elif func.lower() in actives:
7777
self.hidden_active.append(actives[func])
7878
else:

0 commit comments

Comments
 (0)