diff --git a/tensorflow/python/keras/datasets/boston_housing.py b/tensorflow/python/keras/datasets/boston_housing.py index 04a556eb07b..f3900cc075a 100644 --- a/tensorflow/python/keras/datasets/boston_housing.py +++ b/tensorflow/python/keras/datasets/boston_housing.py @@ -48,9 +48,10 @@ def load_data(path='boston_housing.npz', test_split=0.2, seed=113): Returns: Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`. - x_train, x_test: numpy arrays with shape (num_samples, 13) containing + **x_train, x_test**: numpy arrays with shape (num_samples, 13) containing either the training samples (for x_train), or test samples (for y_train) - y_train, y_test: numpy arrays of shape (num_samples, ) containing the + + **y_train, y_test**: numpy arrays of shape (num_samples, ) containing the target scalars. The targets are float scalars typically between 10 and 50 that represent the home prices in k$. """ diff --git a/tensorflow/python/keras/datasets/cifar10.py b/tensorflow/python/keras/datasets/cifar10.py index 310e7bada16..60afd2c5b78 100644 --- a/tensorflow/python/keras/datasets/cifar10.py +++ b/tensorflow/python/keras/datasets/cifar10.py @@ -39,12 +39,13 @@ def load_data(): Returns: Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`. - x_train, x_test: uint8 arrays of RGB image data with shape + **x_train, x_test**: uint8 arrays of RGB image data with shape (num_samples, 3, 32, 32) if the `tf.keras.backend.image_data_format` is 'channels_first', or (num_samples, 32, 32, 3) if the data format is 'channels_last'. - y_train, y_test: uint8 arrays of category labels (integers in range 0-9) - each with shape (num_samples, 1). + + **y_train, y_test**: uint8 arrays of category labels + (integers in range 0-9) each with shape (num_samples, 1). """ dirname = 'cifar-10-batches-py' origin = 'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz' diff --git a/tensorflow/python/keras/datasets/cifar100.py b/tensorflow/python/keras/datasets/cifar100.py index a4cac709863..0c835b40d5d 100644 --- a/tensorflow/python/keras/datasets/cifar100.py +++ b/tensorflow/python/keras/datasets/cifar100.py @@ -45,11 +45,12 @@ def load_data(label_mode='fine'): Returns: Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`. - x_train, x_test: uint8 arrays of RGB image data with shape + **x_train, x_test**: uint8 arrays of RGB image data with shape (num_samples, 3, 32, 32) if the `tf.keras.backend.image_data_format` is 'channels_first', or (num_samples, 32, 32, 3) if the data format is 'channels_last'. - y_train, y_test: uint8 arrays of category labels with shape + + **y_train, y_test**: uint8 arrays of category labels with shape (num_samples, 1). Raises: diff --git a/tensorflow/python/keras/datasets/fashion_mnist.py b/tensorflow/python/keras/datasets/fashion_mnist.py index 030e1c683ee..8ee783a3990 100644 --- a/tensorflow/python/keras/datasets/fashion_mnist.py +++ b/tensorflow/python/keras/datasets/fashion_mnist.py @@ -51,9 +51,10 @@ def load_data(): Returns: Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`. - x_train, x_test: uint8 arrays of grayscale image data with shape + **x_train, x_test**: uint8 arrays of grayscale image data with shape (num_samples, 28, 28). - y_train, y_test: uint8 arrays of labels (integers in range 0-9) + + **y_train, y_test**: uint8 arrays of labels (integers in range 0-9) with shape (num_samples,). License: diff --git a/tensorflow/python/keras/datasets/imdb.py b/tensorflow/python/keras/datasets/imdb.py index e839caabc38..d6f7cf6ae3d 100644 --- a/tensorflow/python/keras/datasets/imdb.py +++ b/tensorflow/python/keras/datasets/imdb.py @@ -78,11 +78,12 @@ def load_data(path='imdb.npz', Returns: Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`. - x_train, x_test: lists of sequences, which are lists of indexes + **x_train, x_test**: lists of sequences, which are lists of indexes (integers). If the num_words argument was specific, the maximum possible index value is num_words-1. If the `maxlen` argument was specified, the largest possible sequence length is `maxlen`. - y_train, y_test: lists of integer labels (1 or 0). + + **y_train, y_test**: lists of integer labels (1 or 0). Raises: ValueError: in case `maxlen` is so low diff --git a/tensorflow/python/keras/datasets/mnist.py b/tensorflow/python/keras/datasets/mnist.py index d17c4b428ff..1d41de197b3 100644 --- a/tensorflow/python/keras/datasets/mnist.py +++ b/tensorflow/python/keras/datasets/mnist.py @@ -41,9 +41,10 @@ def load_data(path='mnist.npz'): Returns: Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`. - x_train, x_test: uint8 arrays of grayscale image data with shapes + **x_train, x_test**: uint8 arrays of grayscale image data with shapes (num_samples, 28, 28). - y_train, y_test: uint8 arrays of digit labels (integers in range 0-9) + + **y_train, y_test**: uint8 arrays of digit labels (integers in range 0-9) with shapes (num_samples,). License: diff --git a/tensorflow/python/keras/datasets/reuters.py b/tensorflow/python/keras/datasets/reuters.py index 966f9a2d549..ceec8d3bfd5 100644 --- a/tensorflow/python/keras/datasets/reuters.py +++ b/tensorflow/python/keras/datasets/reuters.py @@ -89,11 +89,12 @@ def load_data(path='reuters.npz', Returns: Tuple of Numpy arrays: `(x_train, y_train), (x_test, y_test)`. - x_train, x_test: lists of sequences, which are lists of indexes + **x_train, x_test**: lists of sequences, which are lists of indexes (integers). If the num_words argument was specific, the maximum possible index value is num_words-1. If the `maxlen` argument was specified, the largest possible sequence length is `maxlen`. - y_train, y_test: lists of integer labels (1 or 0). + + **y_train, y_test**: lists of integer labels (1 or 0). Note: The 'out of vocabulary' character is only used for words that were present in the training set but are not included