load_mnist¶
-
tfsnippet.datasets.
load_mnist
(x_shape=(28, 28), x_dtype=<type 'numpy.float32'>, y_dtype=<type 'numpy.int32'>, normalize_x=False)¶ Load the MNIST dataset as NumPy arrays.
Parameters: - x_shape – Reshape each digit into this shape. Default
(28, 28, 1)
. - x_dtype – Cast each digit into this data type. Default np.float32.
- y_dtype – Cast each label into this data type. Default np.int32.
- normalize_x (bool) – Whether or not to normalize x into
[0, 1]
, by dividing each pixel value with 255.? (defaultFalse
)
Returns: - The
(train_x, train_y), (test_x, test_y)
Return type: (np.ndarray, np.ndarray), (np.ndarray, np.ndarray)
- x_shape – Reshape each digit into this shape. Default