Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
93624bfe
Unverified
Commit
93624bfe
authored
Sep 22, 2021
by
Yih-Dar
Committed by
GitHub
Sep 22, 2021
Browse files
Fix non-negligible difference between GPT2 and TFGP2 (#13679)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
a0c08aa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/gpt2/modeling_tf_gpt2.py
src/transformers/models/gpt2/modeling_tf_gpt2.py
+1
-1
No files found.
src/transformers/models/gpt2/modeling_tf_gpt2.py
View file @
93624bfe
...
...
@@ -174,7 +174,7 @@ class TFMLP(tf.keras.layers.Layer):
nx
=
config
.
n_embd
self
.
c_fc
=
TFConv1D
(
n_state
,
nx
,
initializer_range
=
config
.
initializer_range
,
name
=
"c_fc"
)
self
.
c_proj
=
TFConv1D
(
nx
,
n_state
,
initializer_range
=
config
.
initializer_range
,
name
=
"c_proj"
)
self
.
act
=
get_tf_activation
(
"gelu"
)
self
.
act
=
get_tf_activation
(
config
.
activation_function
)
self
.
dropout
=
tf
.
keras
.
layers
.
Dropout
(
config
.
resid_pdrop
)
def
call
(
self
,
x
,
training
=
False
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment