Browse Source

fix a bug in MLP

tags/v0.3.0^2
xuyige 6 years ago
parent
commit
e452bc838d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      fastNLP/modules/decoder/MLP.py

+ 1
- 1
fastNLP/modules/decoder/MLP.py View File

@@ -33,7 +33,7 @@ class MLP(nn.Module):
}
if activation in actives:
self.hidden_active = actives[activation]
elif isinstance(activation, callable):
elif callable(activation):
self.hidden_active = activation
else:
raise ValueError("should set activation correctly: {}".format(activation))


Loading…
Cancel
Save