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
73f2c342
Commit
73f2c342
authored
Nov 06, 2019
by
thomwolf
Browse files
fixing template
parent
3835e1e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
templates/adding_a_new_model/configuration_xxx.py
templates/adding_a_new_model/configuration_xxx.py
+1
-1
templates/adding_a_new_model/modeling_xxx.py
templates/adding_a_new_model/modeling_xxx.py
+0
-1
No files found.
templates/adding_a_new_model/configuration_xxx.py
View file @
73f2c342
...
@@ -84,7 +84,7 @@ class XxxConfig(PretrainedConfig):
...
@@ -84,7 +84,7 @@ class XxxConfig(PretrainedConfig):
summary_first_dropout
=
0.1
,
summary_first_dropout
=
0.1
,
**
kwargs
):
**
kwargs
):
super
(
XxxConfig
,
self
).
__init__
(
**
kwargs
)
super
(
XxxConfig
,
self
).
__init__
(
**
kwargs
)
self
.
vocab_size
=
vocab_size_or_config_json_file
if
isinstance
(
vocab_size_or_config_json_file
,
six
.
string_types
)
else
-
1
self
.
vocab_size
=
vocab_size_or_config_json_file
if
isinstance
(
vocab_size_or_config_json_file
,
int
)
else
-
1
self
.
n_ctx
=
n_ctx
self
.
n_ctx
=
n_ctx
self
.
n_positions
=
n_positions
self
.
n_positions
=
n_positions
self
.
n_embd
=
n_embd
self
.
n_embd
=
n_embd
...
...
templates/adding_a_new_model/modeling_xxx.py
View file @
73f2c342
...
@@ -280,7 +280,6 @@ class XxxModel(XxxPreTrainedModel):
...
@@ -280,7 +280,6 @@ class XxxModel(XxxPreTrainedModel):
self
.
init_weights
()
self
.
init_weights
()
@
property
def
get_input_embeddings
(
self
):
def
get_input_embeddings
(
self
):
return
self
.
embeddings
.
word_embeddings
return
self
.
embeddings
.
word_embeddings
...
...
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