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
b482ad47
"tokenization_test.py" did not exist on "12e013dbac308f96b723f82095130d1a4416c155"
Unverified
Commit
b482ad47
authored
Sep 10, 2020
by
Lysandre Debut
Committed by
GitHub
Sep 10, 2020
Browse files
Fix template (#7040)
parent
762cba3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
templates/adding_a_new_model/modeling_tf_xxx.py
templates/adding_a_new_model/modeling_tf_xxx.py
+7
-3
No files found.
templates/adding_a_new_model/modeling_tf_xxx.py
View file @
b482ad47
...
...
@@ -119,11 +119,15 @@ class TFXxxMainLayer(tf.keras.layers.Layer):
def
__init__
(
self
,
config
,
**
kwargs
):
super
().
__init__
(
**
kwargs
)
def
_resize_token_embeddings
(
self
,
new_num_tokens
):
raise
NotImplementedError
# Not implemented yet in the library fr TF 2.0 models
def
get_input_embeddings
(
self
):
return
self
.
embeddings
def
set_input_embeddings
(
self
,
value
):
self
.
embeddings
.
word_embeddings
=
value
self
.
embeddings
.
vocab_size
=
value
.
shape
[
0
]
def
_prune_heads
(
self
,
heads_to_prune
):
raise
NotImplementedError
# Not implemented yet in the library fr TF 2.0 models
raise
NotImplementedError
# Not implemented yet in the library f
o
r TF 2.0 models
def
call
(
self
,
...
...
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