Update mscoco_jsonl_full.py
Browse files- mscoco_jsonl_full.py +12 -1
mscoco_jsonl_full.py
CHANGED
@@ -6,7 +6,12 @@ class EmbeddingsDatasetConfig(datasets.BuilderConfig):
|
|
6 |
|
7 |
def __init__(self, image_base_m, embeddingSize, **kwargs):
|
8 |
super(EmbeddingsDatasetConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
|
9 |
-
self.data_urls =
|
|
|
|
|
|
|
|
|
|
|
10 |
self.image_base_m = image_base_m
|
11 |
self.embeddingSize = embeddingSize
|
12 |
|
@@ -38,6 +43,12 @@ class ImageCaptionsEmbeddings(datasets.GeneratorBasedBuilder):
|
|
38 |
urls_to_download = self.config.data_urls
|
39 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
return [
|
42 |
datasets.SplitGenerator(name=datasets.Split.TRAIN,
|
43 |
gen_kwargs={
|
|
|
6 |
|
7 |
def __init__(self, image_base_m, embeddingSize, **kwargs):
|
8 |
super(EmbeddingsDatasetConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
|
9 |
+
self.data_urls = {
|
10 |
+
"train" :"Vit_B_32_train.jsonl",
|
11 |
+
"dev": "Vit_B_32_val.jsonl",
|
12 |
+
"test": "Vit_B_32_test.jsonl"
|
13 |
+
}
|
14 |
+
|
15 |
self.image_base_m = image_base_m
|
16 |
self.embeddingSize = embeddingSize
|
17 |
|
|
|
43 |
urls_to_download = self.config.data_urls
|
44 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
45 |
|
46 |
+
split_names = {
|
47 |
+
"train": datasets.Split.TRAIN,
|
48 |
+
"dev": datasets.Split.VALIDATION,
|
49 |
+
"test": datasets.Split.TEST,
|
50 |
+
}
|
51 |
+
|
52 |
return [
|
53 |
datasets.SplitGenerator(name=datasets.Split.TRAIN,
|
54 |
gen_kwargs={
|