Skip to content

Commit 5230fbb

Browse files
TensorFlow Datasets Teamcopybara-github
authored andcommitted
Automated documentation update.
PiperOrigin-RevId: 371384833
1 parent b119b55 commit 5230fbb

File tree

2 files changed

+175
-20
lines changed

2 files changed

+175
-20
lines changed

docs/catalog/civil_comments.md

Lines changed: 102 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ comment text.
7474
([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
7575
Not supported.
7676

77-
* **Examples**
78-
([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):
79-
Missing.
80-
8177
## civil_comments/CivilComments (default config)
8278

8379
* **Config description**: The CivilComments set here includes all the data,
@@ -114,6 +110,40 @@ FeaturesDict({
114110
})
115111
```
116112

113+
* **Examples**
114+
([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):
115+
116+
<!-- mdformat off(HTML should not be auto-formatted) -->
117+
118+
{% framebox %}
119+
120+
<button id="displaydataframe">Display examples...</button>
121+
<div id="dataframecontent" style="overflow-x:scroll"></div>
122+
<script src="https://www.gstatic.com/external_hosted/jquery2.min.js"></script>
123+
<script>
124+
var url = "https://storage.googleapis.com/tfds-data/visualization/dataframe/civil_comments-CivilComments-1.1.2.html";
125+
$(document).ready(() => {
126+
$("#displaydataframe").click((event) => {
127+
// Disable the button after clicking (dataframe loaded only once).
128+
$("#displaydataframe").prop("disabled", true);
129+
130+
// Pre-fetch and display the content
131+
$.get(url, (data) => {
132+
$("#dataframecontent").html(data);
133+
}).fail(() => {
134+
$("#dataframecontent").html(
135+
'Error loading examples. If the error persist, please open '
136+
+ 'a new issue.'
137+
);
138+
});
139+
});
140+
});
141+
</script>
142+
143+
{% endframebox %}
144+
145+
<!-- mdformat on -->
146+
117147
* **Citation**:
118148

119149
```
@@ -198,6 +228,40 @@ FeaturesDict({
198228
})
199229
```
200230

231+
* **Examples**
232+
([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):
233+
234+
<!-- mdformat off(HTML should not be auto-formatted) -->
235+
236+
{% framebox %}
237+
238+
<button id="displaydataframe">Display examples...</button>
239+
<div id="dataframecontent" style="overflow-x:scroll"></div>
240+
<script src="https://www.gstatic.com/external_hosted/jquery2.min.js"></script>
241+
<script>
242+
var url = "https://storage.googleapis.com/tfds-data/visualization/dataframe/civil_comments-CivilCommentsIdentities-1.1.2.html";
243+
$(document).ready(() => {
244+
$("#displaydataframe").click((event) => {
245+
// Disable the button after clicking (dataframe loaded only once).
246+
$("#displaydataframe").prop("disabled", true);
247+
248+
// Pre-fetch and display the content
249+
$.get(url, (data) => {
250+
$("#dataframecontent").html(data);
251+
}).fail(() => {
252+
$("#dataframecontent").html(
253+
'Error loading examples. If the error persist, please open '
254+
+ 'a new issue.'
255+
);
256+
});
257+
});
258+
});
259+
</script>
260+
261+
{% endframebox %}
262+
263+
<!-- mdformat on -->
264+
201265
* **Citation**:
202266

203267
```
@@ -296,6 +360,40 @@ FeaturesDict({
296360
})
297361
```
298362

363+
* **Examples**
364+
([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):
365+
366+
<!-- mdformat off(HTML should not be auto-formatted) -->
367+
368+
{% framebox %}
369+
370+
<button id="displaydataframe">Display examples...</button>
371+
<div id="dataframecontent" style="overflow-x:scroll"></div>
372+
<script src="https://www.gstatic.com/external_hosted/jquery2.min.js"></script>
373+
<script>
374+
var url = "https://storage.googleapis.com/tfds-data/visualization/dataframe/civil_comments-CivilCommentsCovert-1.1.2.html";
375+
$(document).ready(() => {
376+
$("#displaydataframe").click((event) => {
377+
// Disable the button after clicking (dataframe loaded only once).
378+
$("#displaydataframe").prop("disabled", true);
379+
380+
// Pre-fetch and display the content
381+
$.get(url, (data) => {
382+
$("#dataframecontent").html(data);
383+
}).fail(() => {
384+
$("#dataframecontent").html(
385+
'Error loading examples. If the error persist, please open '
386+
+ 'a new issue.'
387+
);
388+
});
389+
});
390+
});
391+
</script>
392+
393+
{% endframebox %}
394+
395+
<!-- mdformat on -->
396+
299397
* **Citation**:
300398

301399
```

docs/catalog/imagenet_v2.md

Lines changed: 73 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<meta itemprop="name" content="TensorFlow Datasets" />
44
</div>
55
<meta itemprop="name" content="imagenet_v2" />
6-
<meta itemprop="description" content="ImageNet-v2 is an ImageNet test set (10 per class) collected by closely&#10;following the original labelling protocol. Each image has been labelled by&#10;at least 10 MTurk workers, possibly more, and depending on the strategy used to&#10;select which images to include among the 10 chosen for the given class there are&#10;three different versions of the dataset. Please refer to section four of the&#10;paper for more details on how the different variants were compiled.&#10;&#10;The label space is the same as that of ImageNet2012. Each example is&#10;represented as a dictionary with the following keys:&#10;&#10;* &#x27;image&#x27;: The image, a (H, W, 3)-tensor.&#10;* &#x27;label&#x27;: An integer in the range [0, 1000).&#10;* &#x27;file_name&#x27;: A unique sting identifying the example within the dataset.&#10;&#10;To use this dataset:&#10;&#10;```python&#10;import tensorflow_datasets as tfds&#10;&#10;ds = tfds.load(&#x27;imagenet_v2&#x27;, split=&#x27;train&#x27;)&#10;for ex in ds.take(4):&#10; print(ex)&#10;```&#10;&#10;See [the guide](https://www.tensorflow.org/datasets/overview) for more&#10;informations on [tensorflow_datasets](https://www.tensorflow.org/datasets).&#10;&#10;" />
6+
<meta itemprop="description" content="ImageNet-v2 is an ImageNet test set (10 per class) collected by closely&#10;following the original labelling protocol. Each image has been labelled by&#10;at least 10 MTurk workers, possibly more, and depending on the strategy used to&#10;select which images to include among the 10 chosen for the given class there are&#10;three different versions of the dataset. Please refer to section four of the&#10;paper for more details on how the different variants were compiled.&#10;&#10;The label space is the same as that of ImageNet2012. Each example is&#10;represented as a dictionary with the following keys:&#10;&#10;* &#x27;image&#x27;: The image, a (H, W, 3)-tensor.&#10;* &#x27;label&#x27;: An integer in the range [0, 1000).&#10;* &#x27;file_name&#x27;: A unique sting identifying the example within the dataset.&#10;&#10;To use this dataset:&#10;&#10;```python&#10;import tensorflow_datasets as tfds&#10;&#10;ds = tfds.load(&#x27;imagenet_v2&#x27;, split=&#x27;train&#x27;)&#10;for ex in ds.take(4):&#10; print(ex)&#10;```&#10;&#10;See [the guide](https://www.tensorflow.org/datasets/overview) for more&#10;informations on [tensorflow_datasets](https://www.tensorflow.org/datasets).&#10;&#10;&lt;img src=&quot;https://storage.googleapis.com/tfds-data/visualization/fig/imagenet_v2-matched-frequency-3.0.0.png&quot; alt=&quot;Visualization&quot; width=&quot;500px&quot;&gt;&#10;&#10;" />
77
<meta itemprop="url" content="https://www.tensorflow.org/datasets/catalog/imagenet_v2" />
88
<meta itemprop="sameAs" content="https://github.com/modestyachts/ImageNetV2" />
99
<meta itemprop="citation" content="@inproceedings{recht2019imagenet,&#10; title={Do ImageNet Classifiers Generalize to ImageNet?},&#10; author={Recht, Benjamin and Roelofs, Rebecca and Schmidt, Ludwig and Shankar, Vaishaal},&#10; booktitle={International Conference on Machine Learning},&#10; pages={5389--5400},&#10; year={2019}&#10;}" />
@@ -49,18 +49,15 @@ as a dictionary with the following keys:
4949
Fix file_name, from absolute path to path relative to data directory,
5050
ie: "class_id/filename.jpg".
5151

52-
* **Download size**: `Unknown size`
53-
54-
* **Dataset size**: `Unknown size`
55-
5652
* **Auto-cached**
5753
([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
58-
Unknown
54+
No
5955

6056
* **Splits**:
6157

62-
Split | Examples
63-
:---- | -------:
58+
Split | Examples
59+
:------- | -------:
60+
`'test'` | 10,000
6461

6562
* **Features**:
6663

@@ -77,14 +74,6 @@ FeaturesDict({
7774
`('image', 'label')`
7875

7976

80-
* **Figure**
81-
([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
82-
Not supported.
83-
84-
* **Examples**
85-
([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):
86-
Missing.
87-
8877
* **Citation**:
8978

9079
```
@@ -99,6 +88,74 @@ FeaturesDict({
9988

10089
## imagenet_v2/matched-frequency (default config)
10190

91+
* **Download size**: `1.18 GiB`
92+
93+
* **Dataset size**: `1.16 GiB`
94+
95+
* **Figure**
96+
([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
97+
98+
<img src="https://storage.googleapis.com/tfds-data/visualization/fig/imagenet_v2-matched-frequency-3.0.0.png" alt="Visualization" width="500px">
99+
100+
* **Examples**
101+
([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):
102+
103+
<!-- mdformat off(HTML should not be auto-formatted) -->
104+
105+
{% framebox %}
106+
107+
<button id="displaydataframe">Display examples...</button>
108+
<div id="dataframecontent" style="overflow-x:scroll"></div>
109+
<script src="https://www.gstatic.com/external_hosted/jquery2.min.js"></script>
110+
<script>
111+
var url = "https://storage.googleapis.com/tfds-data/visualization/dataframe/imagenet_v2-matched-frequency-3.0.0.html";
112+
$(document).ready(() => {
113+
$("#displaydataframe").click((event) => {
114+
// Disable the button after clicking (dataframe loaded only once).
115+
$("#displaydataframe").prop("disabled", true);
116+
117+
// Pre-fetch and display the content
118+
$.get(url, (data) => {
119+
$("#dataframecontent").html(data);
120+
}).fail(() => {
121+
$("#dataframecontent").html(
122+
'Error loading examples. If the error persist, please open '
123+
+ 'a new issue.'
124+
);
125+
});
126+
});
127+
});
128+
</script>
129+
130+
{% endframebox %}
131+
132+
<!-- mdformat on -->
133+
102134
## imagenet_v2/threshold-0.7
103135

136+
* **Download size**: `1.16 GiB`
137+
138+
* **Dataset size**: `1.15 GiB`
139+
140+
* **Figure**
141+
([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
142+
143+
<img src="https://storage.googleapis.com/tfds-data/visualization/fig/imagenet_v2-threshold-0.7-3.0.0.png" alt="Visualization" width="500px">
144+
145+
* **Examples**
146+
([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):
147+
Missing.
148+
104149
## imagenet_v2/topimages
150+
151+
* **Download size**: `1.16 GiB`
152+
153+
* **Dataset size**: `1.14 GiB`
154+
155+
* **Figure**
156+
([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
157+
Not supported.
158+
159+
* **Examples**
160+
([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):
161+
Missing.

0 commit comments

Comments
 (0)