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
c4cad8e3
Unverified
Commit
c4cad8e3
authored
Nov 09, 2022
by
Yih-Dar
Committed by
GitHub
Nov 09, 2022
Browse files
Update `CLIPSegModelTester` (#20134)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
0946ed94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
tests/models/clipseg/test_modeling_clipseg.py
tests/models/clipseg/test_modeling_clipseg.py
+9
-3
No files found.
tests/models/clipseg/test_modeling_clipseg.py
View file @
c4cad8e3
...
...
@@ -345,10 +345,16 @@ class CLIPSegTextModelTest(ModelTesterMixin, unittest.TestCase):
class
CLIPSegModelTester
:
def
__init__
(
self
,
parent
,
is_training
=
True
):
def
__init__
(
self
,
parent
,
text_kwargs
=
None
,
vision_kwargs
=
None
,
is_training
=
True
):
if
text_kwargs
is
None
:
text_kwargs
=
{}
if
vision_kwargs
is
None
:
vision_kwargs
=
{}
self
.
parent
=
parent
self
.
text_model_tester
=
CLIPSegTextModelTester
(
parent
)
self
.
vision_model_tester
=
CLIPSegVisionModelTester
(
parent
)
self
.
text_model_tester
=
CLIPSegTextModelTester
(
parent
,
**
text_kwargs
)
self
.
vision_model_tester
=
CLIPSegVisionModelTester
(
parent
,
**
vision_kwargs
)
self
.
is_training
=
is_training
def
prepare_config_and_inputs
(
self
):
...
...
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