Skip to content

Commit

Permalink
internal.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 230327818
  • Loading branch information
pierrot0 authored and Copybara-Service committed Jan 22, 2019
1 parent 7c81d95 commit 7c638f9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tensorflow_datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
# pylint: enable=line-too-long



# Copied from tensorflow/probability
# Ensure TensorFlow is importable and its version is sufficiently recent. This
# needs to happen before anything else, since the imports below will try to
Expand Down Expand Up @@ -88,6 +89,7 @@ def _ensure_tf_install(): # pylint: disable=g-statement-before-imports


# Imports for registration
# pylint: disable=g-import-not-at-top
from tensorflow_datasets import audio
from tensorflow_datasets import image
from tensorflow_datasets import text
Expand All @@ -101,3 +103,4 @@ def _ensure_tf_install(): # pylint: disable=g-statement-before-imports
# __all__ for import * as well as documentation
from tensorflow_datasets import public_api # pylint: disable=g-bad-import-order
__all__ = public_api.__all__

41 changes: 41 additions & 0 deletions tensorflow_datasets/testing/e2e_binary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# Copyright 2018 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

r"""Binary exercising critical workflow of tensorflow datasets.
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from absl import app
import tensorflow_datasets as tfds


def main(argv):
del argv
mnist, info = tfds.load('mnist', with_info=True)
print(mnist, info)
mnist_train = tfds.load('mnist', split='train')
print(mnist_train)
cifar10, info = tfds.load('cifar10', with_info=True)
print(cifar10, info)
cifar10_np = tfds.dataset_as_numpy(cifar10)
print(cifar10_np)


if __name__ == '__main__':
app.run(main)

0 comments on commit 7c638f9

Please sign in to comment.