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
8feede22
Unverified
Commit
8feede22
authored
Mar 10, 2022
by
Shotaro Ishihara
Committed by
GitHub
Mar 09, 2022
Browse files
Fix broken code blocks in README.md (#15967)
at transformers/examples/pytorch/contrastive-image-text
parent
1e8f3799
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
examples/pytorch/contrastive-image-text/README.md
examples/pytorch/contrastive-image-text/README.md
+3
-2
No files found.
examples/pytorch/contrastive-image-text/README.md
View file @
8feede22
...
@@ -39,13 +39,14 @@ wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
...
@@ -39,13 +39,14 @@ wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
wget http://images.cocodataset.org/annotations/image_info_test2017.zip
wget http://images.cocodataset.org/annotations/image_info_test2017.zip
cd
..
cd
..
```
```
```
suggestion
Having downloaded COCO dataset manually you should be able to load with the
`ydshieh/coc_dataset_script`
dataset loading script:
Having downloaded COCO dataset manually you should be able to load with the
`ydshieh/coc_dataset_script`
dataset loading script:
```
py
```
py
COCO_DIR
=
"data"
COCO_DIR
=
"data"
ds
=
datasets
.
load_dataset
(
"ydshieh/coco_dataset_script"
,
"2017"
,
data_dir
=
COCO_DIR
)
ds
=
datasets
.
load_dataset
(
"ydshieh/coco_dataset_script"
,
"2017"
,
data_dir
=
COCO_DIR
)
```
### Create a model from a vision encoder model and a text decoder model
### Create a model from a vision encoder model and a text decoder model
Next, we create a
[
VisionTextDualEncoderModel
](
https://huggingface.co/docs/transformers/model_doc/vision-text-dual-encoder#visiontextdualencoder
)
.
Next, we create a
[
VisionTextDualEncoderModel
](
https://huggingface.co/docs/transformers/model_doc/vision-text-dual-encoder#visiontextdualencoder
)
.
The
`VisionTextDualEncoderModel`
class let's you load any vision and text encoder model to create a dual encoder.
The
`VisionTextDualEncoderModel`
class let's you load any vision and text encoder model to create a dual encoder.
...
...
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