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
6bb6a017
Commit
6bb6a017
authored
Feb 04, 2020
by
James Betker
Committed by
Lysandre Debut
Feb 05, 2020
Browse files
Fix GPT2 config set to trainable
This prevents the model from being saved, and who knows what else.
parent
ada24def
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_tf_gpt2.py
src/transformers/modeling_tf_gpt2.py
+1
-1
No files found.
src/transformers/modeling_tf_gpt2.py
View file @
6bb6a017
...
...
@@ -198,7 +198,7 @@ class TFBlock(tf.keras.layers.Layer):
class
TFGPT2MainLayer
(
tf
.
keras
.
layers
.
Layer
):
def
__init__
(
self
,
config
,
*
inputs
,
**
kwargs
):
super
().
__init__
(
config
,
*
inputs
,
**
kwargs
)
super
().
__init__
(
*
inputs
,
**
kwargs
)
self
.
output_hidden_states
=
config
.
output_hidden_states
self
.
output_attentions
=
config
.
output_attentions
self
.
num_hidden_layers
=
config
.
n_layer
...
...
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