Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
e36a83d3
Unverified
Commit
e36a83d3
authored
Jan 06, 2022
by
AK391
Committed by
GitHub
Jan 06, 2022
Browse files
Merge branch 'huggingface:master' into master
parents
cac87742
cc406da4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/vision_text_dual_encoder/modeling_vision_text_dual_encoder.py
...on_text_dual_encoder/modeling_vision_text_dual_encoder.py
+1
-1
No files found.
src/transformers/models/vision_text_dual_encoder/modeling_vision_text_dual_encoder.py
View file @
e36a83d3
...
@@ -341,7 +341,7 @@ class VisionTextDualEncoderModel(PreTrainedModel):
...
@@ -341,7 +341,7 @@ class VisionTextDualEncoderModel(PreTrainedModel):
... pixel_values=inputs.pixel_values,
... pixel_values=inputs.pixel_values,
... return_loss=True,
... return_loss=True,
... )
... )
>>> loss, logits_per_image = outputs.loss, outputs.logits_per_imag # this is the image-text similarity score
>>> loss, logits_per_image = outputs.loss, outputs.logits_per_imag
e
# this is the image-text similarity score
>>> # save and load from pretrained
>>> # save and load from pretrained
>>> model.save_pretrained("vit-bert")
>>> model.save_pretrained("vit-bert")
...
...
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