-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename dataset_as_numpy as_numpy and update docs
PiperOrigin-RevId: 232039691
- Loading branch information
Ryan Sepassi
authored and
Copybara-Service
committed
Feb 1, 2019
1 parent
da219a0
commit 78bb6ee
Showing
33 changed files
with
594 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<div itemscope itemtype="http://developers.google.com/ReferenceObject"> | ||
<meta itemprop="name" content="tfds.as_numpy" /> | ||
<meta itemprop="path" content="Stable" /> | ||
</div> | ||
|
||
# tfds.as_numpy | ||
|
||
``` python | ||
tfds.as_numpy( | ||
dataset, | ||
graph=None | ||
) | ||
``` | ||
|
||
|
||
|
||
Defined in [`core/dataset_utils.py`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/core/dataset_utils.py). | ||
|
||
Converts a `tf.data.Dataset` to an iterable of NumPy arrays. | ||
|
||
`as_numpy` converts a possibly nested structure of `tf.data.Dataset`s | ||
and `tf.Tensor`s to iterables of NumPy arrays and NumPy arrays, respectively. | ||
|
||
#### Args: | ||
|
||
* <b>`dataset`</b>: a possibly nested structure of `tf.data.Dataset`s and/or | ||
`tf.Tensor`s. | ||
* <b>`graph`</b>: `tf.Graph`, optional, explicitly set the graph to use. | ||
|
||
|
||
#### Returns: | ||
|
||
A structure matching `dataset` where `tf.data.Dataset`s are converted to | ||
generators of NumPy arrays and `tf.Tensor`s are converted to NumPy arrays. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
|
||
## Class `NamedSplit` | ||
|
||
|
||
Inherits From: [`SplitBase`](../../tfds/core/SplitBase.md) | ||
|
||
|
||
|
||
|
Oops, something went wrong.