Fix template (#7040)

This commit is contained in:
Lysandre Debut 2020-09-10 14:45:52 +02:00 committed by GitHub
parent 762cba3bda
commit b482ad474a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -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 for TF 2.0 models
def call(
self,