Unverified Commit 893122f6 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Add TF prefix to TF-Res test class (#18481)


Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent bf174f91
...@@ -41,7 +41,7 @@ if is_vision_available(): ...@@ -41,7 +41,7 @@ if is_vision_available():
from transformers import AutoFeatureExtractor from transformers import AutoFeatureExtractor
class ResNetModelTester: class TFResNetModelTester:
def __init__( def __init__(
self, self,
parent, parent,
...@@ -116,7 +116,7 @@ class ResNetModelTester: ...@@ -116,7 +116,7 @@ class ResNetModelTester:
@require_tf @require_tf
class ResNetModelTest(TFModelTesterMixin, unittest.TestCase): class TFResNetModelTest(TFModelTesterMixin, unittest.TestCase):
""" """
Here we also overwrite some of the tests of test_modeling_common.py, as ResNet does not use input_ids, inputs_embeds, Here we also overwrite some of the tests of test_modeling_common.py, as ResNet does not use input_ids, inputs_embeds,
attention_mask and seq_length. attention_mask and seq_length.
...@@ -131,7 +131,7 @@ class ResNetModelTest(TFModelTesterMixin, unittest.TestCase): ...@@ -131,7 +131,7 @@ class ResNetModelTest(TFModelTesterMixin, unittest.TestCase):
has_attentions = False has_attentions = False
def setUp(self): def setUp(self):
self.model_tester = ResNetModelTester(self) self.model_tester = TFResNetModelTester(self)
self.config_tester = ConfigTester(self, config_class=ResNetConfig, has_text_modality=False) self.config_tester = ConfigTester(self, config_class=ResNetConfig, has_text_modality=False)
def test_config(self): def test_config(self):
...@@ -223,7 +223,7 @@ def prepare_img(): ...@@ -223,7 +223,7 @@ def prepare_img():
@require_tf @require_tf
@require_vision @require_vision
class ResNetModelIntegrationTest(unittest.TestCase): class TFResNetModelIntegrationTest(unittest.TestCase):
@cached_property @cached_property
def default_feature_extractor(self): def default_feature_extractor(self):
return ( return (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment