system HF staff commited on
Commit
9fd6b98
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - found
6
+ languages: []
7
+ licenses:
8
+ - unknown
9
+ multilinguality: []
10
+ size_categories:
11
+ - n<1K
12
+ source_datasets:
13
+ - extended|other-80-Million-Tiny-Images
14
+ task_categories:
15
+ - other
16
+ task_ids:
17
+ - other-other-image-classification
18
+ ---
19
+
20
+ # Dataset Card for CIFAR-10
21
+
22
+ ## Table of Contents
23
+ - [Dataset Description](#dataset-description)
24
+ - [Dataset Summary](#dataset-summary)
25
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
26
+ - [Languages](#languages)
27
+ - [Dataset Structure](#dataset-structure)
28
+ - [Data Instances](#data-instances)
29
+ - [Data Fields](#data-instances)
30
+ - [Data Splits](#data-instances)
31
+ - [Dataset Creation](#dataset-creation)
32
+ - [Curation Rationale](#curation-rationale)
33
+ - [Source Data](#source-data)
34
+ - [Annotations](#annotations)
35
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
36
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
37
+ - [Social Impact of Dataset](#social-impact-of-dataset)
38
+ - [Discussion of Biases](#discussion-of-biases)
39
+ - [Other Known Limitations](#other-known-limitations)
40
+ - [Additional Information](#additional-information)
41
+ - [Dataset Curators](#dataset-curators)
42
+ - [Licensing Information](#licensing-information)
43
+ - [Citation Information](#citation-information)
44
+
45
+ ## Dataset Description
46
+
47
+ - **Homepage:** https://www.cs.toronto.edu/~kriz/cifar.html
48
+ - **Repository:**
49
+ - **Paper:** Learning Multiple Layers of Features from Tiny Images by Alex Krizhevsky
50
+ - **Leaderboard:**
51
+ - **Point of Contact:**
52
+
53
+ ### Dataset Summary
54
+
55
+ The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images.
56
+ The dataset is divided into five training batches and one test batch, each with 10000 images. The test batch contains exactly 1000 randomly-selected images from each class. The training batches contain the remaining images in random order, but some training batches may contain more images from one class than another. Between them, the training batches contain exactly 5000 images from each class.
57
+
58
+ ### Supported Tasks and Leaderboards
59
+
60
+ [More Information Needed]
61
+
62
+ ### Languages
63
+
64
+ English
65
+
66
+ ## Dataset Structure
67
+
68
+ ### Data Instances
69
+
70
+ [More Information Needed]
71
+
72
+ ### Data Fields
73
+
74
+ - img: 32x32x3 image
75
+ - label: 0-9 with the following correspondence
76
+ 0 airplane
77
+ 1 automobile
78
+ 2 bird
79
+ 3 cat
80
+ 4 deer
81
+ 5 dog
82
+ 6 frog
83
+ 7 horse
84
+ 8 ship
85
+ 9 truck
86
+
87
+ ### Data Splits
88
+
89
+ Train and Test
90
+
91
+ ## Dataset Creation
92
+
93
+ ### Curation Rationale
94
+
95
+ [More Information Needed]
96
+
97
+ ### Source Data
98
+
99
+ #### Initial Data Collection and Normalization
100
+
101
+ [More Information Needed]
102
+
103
+ #### Who are the source language producers?
104
+
105
+ [More Information Needed]
106
+
107
+ ### Annotations
108
+
109
+ #### Annotation process
110
+
111
+ [More Information Needed]
112
+
113
+ #### Who are the annotators?
114
+
115
+ [More Information Needed]
116
+
117
+ ### Personal and Sensitive Information
118
+
119
+ [More Information Needed]
120
+
121
+ ## Considerations for Using the Data
122
+
123
+ ### Social Impact of Dataset
124
+
125
+ [More Information Needed]
126
+
127
+ ### Discussion of Biases
128
+
129
+ [More Information Needed]
130
+
131
+ ### Other Known Limitations
132
+
133
+ [More Information Needed]
134
+
135
+ ## Additional Information
136
+
137
+ ### Dataset Curators
138
+
139
+ [More Information Needed]
140
+
141
+ ### Licensing Information
142
+
143
+ [More Information Needed]
144
+
145
+ ### Citation Information
146
+
147
+ ```
148
+ @TECHREPORT{Krizhevsky09learningmultiple,
149
+ author = {Alex Krizhevsky},
150
+ title = {Learning multiple layers of features from tiny images},
151
+ institution = {},
152
+ year = {2009}
153
+ }
154
+ ```
cifar10.py ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ # Lint as: python3
17
+ """CIFAR-10 Data Set"""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import os
22
+ import pickle
23
+
24
+ import numpy as np
25
+
26
+ import datasets
27
+
28
+
29
+ _CITATION = """\
30
+ @TECHREPORT{Krizhevsky09learningmultiple,
31
+ author = {Alex Krizhevsky},
32
+ title = {Learning multiple layers of features from tiny images},
33
+ institution = {},
34
+ year = {2009}
35
+ }
36
+ """
37
+
38
+ _DESCRIPTION = """\
39
+ The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images
40
+ per class. There are 50000 training images and 10000 test images.
41
+ """
42
+
43
+ _DATA_URL = "https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz"
44
+
45
+
46
+ class Cifar10(datasets.GeneratorBasedBuilder):
47
+ """CIFAR-10 Data Set"""
48
+
49
+ BUILDER_CONFIGS = [
50
+ datasets.BuilderConfig(
51
+ name="plain_text",
52
+ version=datasets.Version("1.0.0", ""),
53
+ description="Plain text import of CIFAR-10 Data Set",
54
+ )
55
+ ]
56
+
57
+ def _info(self):
58
+ return datasets.DatasetInfo(
59
+ description=_DESCRIPTION,
60
+ features=datasets.Features(
61
+ {
62
+ "img": datasets.Array3D(shape=(32, 32, 3), dtype="uint8"),
63
+ "label": datasets.features.ClassLabel(
64
+ names=[
65
+ "airplane",
66
+ "automobile",
67
+ "bird",
68
+ "cat",
69
+ "deer",
70
+ "dog",
71
+ "frog",
72
+ "horse",
73
+ "ship",
74
+ "truck",
75
+ ]
76
+ ),
77
+ }
78
+ ),
79
+ supervised_keys=("img", "label"),
80
+ homepage="https://www.cs.toronto.edu/~kriz/cifar.html",
81
+ citation=_CITATION,
82
+ )
83
+
84
+ def _split_generators(self, dl_manager):
85
+ dl_dir = dl_manager.download_and_extract(_DATA_URL)
86
+ final_dir = os.path.join(dl_dir, "cifar-10-batches-py")
87
+
88
+ return [
89
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": final_dir, "split": "train"}),
90
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": final_dir, "split": "test"}),
91
+ ]
92
+
93
+ def _generate_examples(self, filepath, split):
94
+ """This function returns the examples in the raw (text) form."""
95
+
96
+ if split == "train":
97
+ batches = ["data_batch_1", "data_batch_2", "data_batch_3", "data_batch_4", "data_batch_5"]
98
+
99
+ if split == "test":
100
+ batches = ["test_batch"]
101
+
102
+ for batch in batches:
103
+
104
+ file = os.path.join(filepath, batch)
105
+
106
+ with open(file, "rb") as fo:
107
+
108
+ dict = pickle.load(fo, encoding="bytes")
109
+
110
+ labels = dict[b"labels"]
111
+ images = dict[b"data"]
112
+
113
+ for idx, _ in enumerate(images):
114
+
115
+ img_reshaped = np.transpose(np.reshape(images[idx], (3, 32, 32)), (1, 2, 0))
116
+
117
+ yield idx, {
118
+ "img": img_reshaped,
119
+ "label": labels[idx],
120
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"plain_text": {"description": "The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images\nper class. There are 50000 training images and 10000 test images.\n", "citation": "@TECHREPORT{Krizhevsky09learningmultiple,\n author = {Alex Krizhevsky},\n title = {Learning multiple layers of features from tiny images},\n institution = {},\n year = {2009}\n}\n", "homepage": "https://www.cs.toronto.edu/~kriz/cifar.html", "license": "", "features": {"img": {"shape": [32, 32, 3], "dtype": "uint8", "id": null, "_type": "Array3D"}, "label": {"num_classes": 10, "names": ["airplane", "automobile", "bird", "cat", "deer", "dog", "frog", "horse", "ship", "truck"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": {"input": "img", "output": "label"}, "builder_name": "cifar10", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 365400060, "num_examples": 50000, "dataset_name": "cifar10"}, "test": {"name": "test", "num_bytes": 73080012, "num_examples": 10000, "dataset_name": "cifar10"}}, "download_checksums": {"https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz": {"num_bytes": 170498071, "checksum": "6d958be074577803d12ecdefd02955f39262c83c16fe9348329d7fe0b5c001ce"}}, "download_size": 170498071, "post_processing_size": null, "dataset_size": 438480072, "size_in_bytes": 608978143}}
dummy/plain_text/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0119b0b3828cd10720335ed6f6d1360d699adda989d199bd7ccdb50a891ea2c
3
+ size 37551