fix run_clip README (#18332)
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -43,7 +43,10 @@ cd ..
|
|||||||
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"
|
import os
|
||||||
|
import datasets
|
||||||
|
|
||||||
|
COCO_DIR = os.path.join(os.getcwd(), "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)
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -84,7 +87,7 @@ Finally, we can run the example script to train the model:
|
|||||||
python examples/pytorch/contrastive-image-text/run_clip.py \
|
python examples/pytorch/contrastive-image-text/run_clip.py \
|
||||||
--output_dir ./clip-roberta-finetuned \
|
--output_dir ./clip-roberta-finetuned \
|
||||||
--model_name_or_path ./clip-roberta \
|
--model_name_or_path ./clip-roberta \
|
||||||
--data_dir ./data \
|
--data_dir $PWD/data \
|
||||||
--dataset_name ydshieh/coco_dataset_script \
|
--dataset_name ydshieh/coco_dataset_script \
|
||||||
--dataset_config_name=2017 \
|
--dataset_config_name=2017 \
|
||||||
--image_column image_path \
|
--image_column image_path \
|
||||||
|
|||||||
Reference in New Issue
Block a user