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
893122f6
Unverified
Commit
893122f6
authored
Aug 05, 2022
by
Yih-Dar
Committed by
GitHub
Aug 05, 2022
Browse files
Add TF prefix to TF-Res test class (#18481)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
bf174f91
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/models/resnet/test_modeling_tf_resnet.py
tests/models/resnet/test_modeling_tf_resnet.py
+4
-4
No files found.
tests/models/resnet/test_modeling_tf_resnet.py
View file @
893122f6
...
@@ -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
TF
ResNetModelTester
:
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
TF
ResNetModelTest
(
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
=
TF
ResNetModelTester
(
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
TF
ResNetModelIntegrationTest
(
unittest
.
TestCase
):
@
cached_property
@
cached_property
def
default_feature_extractor
(
self
):
def
default_feature_extractor
(
self
):
return
(
return
(
...
...
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