Unverified Commit a02a4815 authored by Rockey's avatar Rockey Committed by GitHub
Browse files

[Fix] GELU got an unexpected keyword argument 'inplace' (#1847)

parent f2c50930
...@@ -157,7 +157,7 @@ class ConvModule(nn.Module): ...@@ -157,7 +157,7 @@ class ConvModule(nn.Module):
act_cfg_ = act_cfg.copy() act_cfg_ = act_cfg.copy()
# nn.Tanh has no 'inplace' argument # nn.Tanh has no 'inplace' argument
if act_cfg_['type'] not in [ if act_cfg_['type'] not in [
'Tanh', 'PReLU', 'Sigmoid', 'HSigmoid', 'Swish' 'Tanh', 'PReLU', 'Sigmoid', 'HSigmoid', 'Swish', 'GELU'
]: ]:
act_cfg_.setdefault('inplace', inplace) act_cfg_.setdefault('inplace', inplace)
self.activate = build_activation_layer(act_cfg_) self.activate = build_activation_layer(act_cfg_)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment