From bb61e30962c0a6cf866e7e8e5a75b7d86d8589c2 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 8 Sep 2022 15:29:53 +0530 Subject: [PATCH] style fixes --- src/transformers/models/owlvit/modeling_owlvit.py | 2 +- tests/models/owlvit/test_modeling_owlvit.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/transformers/models/owlvit/modeling_owlvit.py b/src/transformers/models/owlvit/modeling_owlvit.py index f7054ffc3bae..d6e258a1c8cb 100644 --- a/src/transformers/models/owlvit/modeling_owlvit.py +++ b/src/transformers/models/owlvit/modeling_owlvit.py @@ -1078,7 +1078,7 @@ def get_image_features( last_hidden_state = vision_outputs[0] image_features = self.vision_model.post_layernorm(last_hidden_state) # Unmodified CLIP embeddings - else: + else: pooled_output = vision_outputs[1] image_features = self.visual_projection(pooled_output) diff --git a/tests/models/owlvit/test_modeling_owlvit.py b/tests/models/owlvit/test_modeling_owlvit.py index 0cb1f087a3c5..d7df3410a34d 100644 --- a/tests/models/owlvit/test_modeling_owlvit.py +++ b/tests/models/owlvit/test_modeling_owlvit.py @@ -762,7 +762,6 @@ def recursive_check(tuple_object, dict_object): dict_inputs = self._prepare_for_class(inputs_dict, model_class) check_equivalence(model, tuple_inputs, dict_inputs) - @slow def test_model_from_pretrained(self): for model_name in OWLVIT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]: