Skip to content

Commit

Permalink
further clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
zzz2010 committed Dec 16, 2021
1 parent c6286bc commit 896457d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions paddlenlp/transformers/funnel/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
CONFIG_NAME = "model_config.json"
INF = 1e6


class PretrainedConfig(dict):
r"""
Base class for all configuration classes. Handles a few parameters common to all models' configurations as well as
Expand Down Expand Up @@ -972,10 +971,7 @@ def gelu_new(x):
return 0.5 * x * (1.0 + paddle.tanh(math.sqrt(2.0 / math.pi) * (x + 0.044715 * paddle.pow(x, 3.0))))


if version.parse(paddle.__version__) < version.parse("1.4"):
gelu = _gelu_python
else:
gelu = nn.functional.gelu
gelu = nn.functional.gelu


def gelu_fast(x):
Expand Down Expand Up @@ -1022,9 +1018,6 @@ def get_activation(activation_string):
raise KeyError(f"function {activation_string} not found in ACT2FN mapping {list(ACT2FN.keys())}")





class FunnelEmbeddings(nn.Layer):
def __init__(self, config):
super().__init__()
Expand Down

0 comments on commit 896457d

Please sign in to comment.