Blip: get/set input embeddings correctly (#34152)
* set-get embeds * add tests * fix tests * remove * return dict True * fix tests * why did i remove this * enabel torchscript tests
This commit is contained in:
committed by
GitHub
parent
b53e44e847
commit
6beb3f1691
@@ -1811,6 +1811,7 @@ class ModelTesterMixin:
|
||||
original_config,
|
||||
inputs_dict,
|
||||
) = self.model_tester.prepare_config_and_inputs_for_common()
|
||||
inputs_dict.pop("labels", None)
|
||||
|
||||
for model_class in self.all_model_classes:
|
||||
config = copy.deepcopy(original_config)
|
||||
@@ -1988,6 +1989,7 @@ class ModelTesterMixin:
|
||||
|
||||
original_config, inputs_dict = self.model_tester.prepare_config_and_inputs_for_common()
|
||||
original_config.tie_word_embeddings = False
|
||||
inputs_dict.pop("labels", None)
|
||||
|
||||
# if model cannot untied embeddings -> leave test
|
||||
if original_config.tie_word_embeddings:
|
||||
|
||||
Reference in New Issue
Block a user